add upstream patch from author to fix OpenSSL connections

This commit is contained in:
david 2005-02-20 07:19:57 +00:00
parent bdee76b50e
commit cdefa902f7
2 changed files with 41 additions and 0 deletions

View File

@ -0,0 +1,23 @@
$OpenBSD: patch-src_tcp_c,v 1.1 2005/02/20 07:19:57 david Exp $
--- src/tcp.c.orig 2004-12-21 13:09:54.000000000 -0600
+++ src/tcp.c 2005-02-20 01:14:55.000000000 -0600
@@ -596,9 +596,10 @@ static void TCPDispatchPeer (Connection
return;
}
+ peer->connect &= ~CONNECT_SELECT_W;
/* Recv all packets before doing anything else.
The objective is to delete any packets CANCELLED by the remote user. */
- while (UtilIOSelectIs (peer->sok, READFDS) && i++ <= TCP_MSG_QUEUE)
+ while (UtilIOSelectIs (peer->sok, READFDS | WRITEFDS) && i++ <= TCP_MSG_QUEUE)
{
if (!(pak = TCPReceivePacket (peer)))
return;
@@ -645,7 +646,6 @@ static void TCPDispatchPeer (Connection
UtilIOSelectAdd (peer->sok, READFDS);
UtilIOSelect();
}
- peer->connect &= ~CONNECT_SELECT_W;
}
/*********************************************/

View File

@ -0,0 +1,18 @@
$OpenBSD: patch-src_util_ssl_c,v 1.1 2005/02/20 07:19:57 david Exp $
--- src/util_ssl.c.orig 2005-02-11 17:33:11.000000000 -0600
+++ src/util_ssl.c 2005-02-20 01:14:55.000000000 -0600
@@ -538,9 +538,13 @@ int ssl_handshake (Connection *conn DEBU
#ifdef SSL_ERROR_WANT_ACCEPT
case SSL_ERROR_WANT_ACCEPT:
#endif
+ case SSL_ERROR_WANT_READ:
+ conn->ssl_status = SSL_STATUS_HANDSHAKE;
+ conn->connect |= CONNECT_SELECT_R;
+ return 1;
+
case SSL_ERROR_WANT_CONNECT:
case SSL_ERROR_WANT_WRITE:
- case SSL_ERROR_WANT_READ:
case SSL_ERROR_WANT_X509_LOOKUP:
conn->ssl_status = SSL_STATUS_HANDSHAKE;
conn->connect |= CONNECT_SELECT_R | CONNECT_SELECT_W;