提交 24252537 编写于 作者: M Matt Caswell

Remove session checks from SSL_clear()

We now allow a different protocol version when reusing a session so we can
unconditionally reset the SSL_METHOD if it has changed.
Reviewed-by: NBen Kaduk <kaduk@mit.edu>
Reviewed-by: NBernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/3954)
上级 e11b6aa4
......@@ -566,12 +566,9 @@ int SSL_clear(SSL *s)
/*
* Check to see if we were changed into a different method, if so, revert
* back. We always do this in TLSv1.3. Below that we only do it if we are
* not doing session-id reuse.
* back.
*/
if (s->method != s->ctx->method
&& (SSL_IS_TLS13(s)
|| (!ossl_statem_get_in_handshake(s) && s->session == NULL))) {
if (s->method != s->ctx->method) {
s->method->ssl_free(s);
s->method = s->ctx->method;
if (!s->method->ssl_new(s))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册