X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=ssl%2Fssl_lib.c;h=72821a1fce6a138067eaed4e48b8a020cb33dfd4;hp=7257daa8ffde6cc96bcb536be83ce93dbb51c077;hb=979689aa5cfa100ccbc1f25064e9398be4b7b05c;hpb=a3faebd1041576a59bffe01bbd2c68495870ec5e diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index 7257daa8ff..72821a1fce 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -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;