summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2010-01-24 13:50:57 +0000
committerDr. Stephen Henson <steve@openssl.org>2010-01-24 13:50:57 +0000
commit5598b99fb324ab97e5ea196d5eacddaed0e054c6 (patch)
tree434f3e44c4630f42aa9cd4806712f1979084e539 /apps
parent6899d9bbf60469c1d16c9f72d2ef0f835f0e7caf (diff)
The fix for PR#1949 unfortunately broke cases where the BIO_CTRL_WPENDING
ctrl is incorrectly implemented (e.g. some versions of Apache). As a workaround call both BIO_CTRL_INFO and BIO_CTRL_WPENDING if it returns zero. This should both address the original bug and retain compatibility with the old behaviour.
Diffstat (limited to 'apps')
-rw-r--r--apps/s_server.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/apps/s_server.c b/apps/s_server.c
index 88b308ca38..f44bf5e840 100644
--- a/apps/s_server.c
+++ b/apps/s_server.c
@@ -1836,6 +1836,20 @@ static int sv_body(char *hostname, int s, unsigned char *context)
continue;
/* strcpy(buf,"server side RE-NEGOTIATE\n"); */
}
+ if ((buf[0] == 'X') &&
+ ((buf[1] == '\n') || (buf[1] == '\r')))
+ {
+ SSL_renegotiate(con);
+ i=SSL_do_handshake(con);
+ printf("SSL_do_handshake1 -> %d\n",i);
+ if (SSL_get_state(con) != SSL_ST_OK)
+ printf("Bad State\n");
+ con->state = SSL_ST_ACCEPT;
+ i=SSL_do_handshake(con);
+ printf("SSL_do_handshake2 -> %d\n",i);
+ i=0; /*13; */
+ continue;
+ }
if ((buf[0] == 'R') &&
((buf[1] == '\n') || (buf[1] == '\r')))
{