diff options
author | jsing <> | 2020-02-06 16:05:58 +0000 |
---|---|---|
committer | jsing <> | 2020-02-06 16:05:58 +0000 |
commit | 58e95f97605e3022a706f9d27cd821155b6c9271 (patch) | |
tree | 24f473cef5fba8a6d958bb2aa51440f7f45a77c3 /src | |
parent | d69e69c9cb2bd0bf58a6ab0f826b459e7208214b (diff) | |
download | openbsd-58e95f97605e3022a706f9d27cd821155b6c9271.tar.gz openbsd-58e95f97605e3022a706f9d27cd821155b6c9271.tar.bz2 openbsd-58e95f97605e3022a706f9d27cd821155b6c9271.zip |
Add a workaround to make SSL_set_session() work with TLSv1.3.
While we do not currently do session resumption, just return the
TLS_client_method() or TLS_server_method() when asked for a method that
does TLSv1.3.
ok tb@ (who also arrived at the same diff)
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libssl/ssl_methods.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/lib/libssl/ssl_methods.c b/src/lib/libssl/ssl_methods.c index 208de33c01..276fcc66d8 100644 --- a/src/lib/libssl/ssl_methods.c +++ b/src/lib/libssl/ssl_methods.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_methods.c,v 1.11 2020/01/23 10:48:37 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_methods.c,v 1.12 2020/02/06 16:05:58 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 | * |
@@ -366,6 +366,10 @@ static const SSL_METHOD TLSv1_2_client_method_data = { | |||
366 | const SSL_METHOD * | 366 | const SSL_METHOD * |
367 | tls1_get_client_method(int ver) | 367 | tls1_get_client_method(int ver) |
368 | { | 368 | { |
369 | #ifdef LIBRESSL_HAS_TLS1_3_CLIENT | ||
370 | if (ver == TLS1_3_VERSION) | ||
371 | return (TLS_client_method()); | ||
372 | #endif | ||
369 | if (ver == TLS1_2_VERSION) | 373 | if (ver == TLS1_2_VERSION) |
370 | return (TLSv1_2_client_method()); | 374 | return (TLSv1_2_client_method()); |
371 | if (ver == TLS1_1_VERSION) | 375 | if (ver == TLS1_1_VERSION) |
@@ -734,6 +738,10 @@ static const SSL_METHOD TLSv1_2_server_method_data = { | |||
734 | const SSL_METHOD * | 738 | const SSL_METHOD * |
735 | tls1_get_server_method(int ver) | 739 | tls1_get_server_method(int ver) |
736 | { | 740 | { |
741 | #ifdef LIBRESSL_HAS_TLS1_3_SERVER | ||
742 | if (ver == TLS1_3_VERSION) | ||
743 | return (TLS_server_method()); | ||
744 | #endif | ||
737 | if (ver == TLS1_2_VERSION) | 745 | if (ver == TLS1_2_VERSION) |
738 | return (TLSv1_2_server_method()); | 746 | return (TLSv1_2_server_method()); |
739 | if (ver == TLS1_1_VERSION) | 747 | if (ver == TLS1_1_VERSION) |