Fix SSL handshake functions and SSL_clear() such that SSL_clear()

never resets s->method to s->ctx->method when called from within
one of the SSL handshake functions.
This commit is contained in:
Bodo Möller
2001-10-24 19:03:22 +00:00
parent a3faebd104
commit 979689aa5c
8 changed files with 12 additions and 7 deletions

View File

@@ -193,7 +193,7 @@ int SSL_clear(SSL *s)
#if 1
/* Check to see if we were changed into a different method, if
* so, revert back if we are not doing session-id reuse. */
if ((s->session == NULL) && (s->method != s->ctx->method))
if (!s->in_handshake && (s->session == NULL) && (s->method != s->ctx->method))
{
s->method->ssl_free(s);
s->method=s->ctx->method;