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.
This commit is contained in:
Dr. Stephen Henson
2010-01-24 13:50:57 +00:00
parent 6899d9bbf6
commit 5598b99fb3
3 changed files with 29 additions and 2 deletions

View File

@@ -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')))
{