summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/libssl/ssl_lib.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c
index a6bdfaa4a1..a5a79d76bc 100644
--- a/src/lib/libssl/ssl_lib.c
+++ b/src/lib/libssl/ssl_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_lib.c,v 1.210 2020/01/23 10:40:59 jsing Exp $ */ 1/* $OpenBSD: ssl_lib.c,v 1.211 2020/01/26 07:24:47 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -2240,6 +2240,15 @@ SSL_set_ssl_method(SSL *s, const SSL_METHOD *meth)
2240 ret = s->method->internal->ssl_new(s); 2240 ret = s->method->internal->ssl_new(s);
2241 } 2241 }
2242 2242
2243 /*
2244 * XXX - reset the client max version to that of the incoming
2245 * method, otherwise a caller that uses a TLS_method() and then
2246 * sets with TLS_client_method() cannot do TLSv1.3.
2247 */
2248 if (meth->internal->max_version == TLS1_3_VERSION &&
2249 meth->internal->ssl_connect != NULL)
2250 s->internal->max_version = meth->internal->max_version;
2251
2243 if (conn == 1) 2252 if (conn == 1)
2244 s->internal->handshake_func = meth->internal->ssl_connect; 2253 s->internal->handshake_func = meth->internal->ssl_connect;
2245 else if (conn == 0) 2254 else if (conn == 0)