diff options
| author | jsing <> | 2020-01-23 10:40:59 +0000 |
|---|---|---|
| committer | jsing <> | 2020-01-23 10:40:59 +0000 |
| commit | e923e6a6e5ee7ab0943514d73b7f609470b200a5 (patch) | |
| tree | 43dc459859c1fb1a2702abab83aea4b376e97893 /src/lib/libssl/ssl_locl.h | |
| parent | 70924e04e3da29e2a630b2f51a0a1afac1e35107 (diff) | |
| download | openbsd-e923e6a6e5ee7ab0943514d73b7f609470b200a5.tar.gz openbsd-e923e6a6e5ee7ab0943514d73b7f609470b200a5.tar.bz2 openbsd-e923e6a6e5ee7ab0943514d73b7f609470b200a5.zip | |
Correctly handle TLSv1.3 ciphers suites in ssl3_choose_cipher().
Currently, TLSv1.3 cipher suites are filtered out by the fact that
they have authentication and key exchange algorithms that are not
being set in ssl_set_cert_masks(). Fix this so that ssl3_choose_cipher()
works for TLSv1.3, however we also now need to ensure that we filter out
TLSv1.3 for non-TLSv1.3 and only select TLSv1.3 for TLSv1.3.
ok beck@ tb@
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libssl/ssl_locl.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/lib/libssl/ssl_locl.h b/src/lib/libssl/ssl_locl.h index 2c774a3d77..6703e8feee 100644 --- a/src/lib/libssl/ssl_locl.h +++ b/src/lib/libssl/ssl_locl.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ssl_locl.h,v 1.254 2020/01/23 06:15:44 beck Exp $ */ | 1 | /* $OpenBSD: ssl_locl.h,v 1.255 2020/01/23 10:40:59 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 | * |
| @@ -342,6 +342,10 @@ __BEGIN_HIDDEN_DECLS | |||
| 342 | #define SSL_USE_TLS1_2_CIPHERS(s) \ | 342 | #define SSL_USE_TLS1_2_CIPHERS(s) \ |
| 343 | (s->method->internal->ssl3_enc->enc_flags & SSL_ENC_FLAG_TLS1_2_CIPHERS) | 343 | (s->method->internal->ssl3_enc->enc_flags & SSL_ENC_FLAG_TLS1_2_CIPHERS) |
| 344 | 344 | ||
| 345 | /* Allow TLS 1.3 ciphersuites only. */ | ||
| 346 | #define SSL_USE_TLS1_3_CIPHERS(s) \ | ||
| 347 | (s->method->internal->ssl3_enc->enc_flags & SSL_ENC_FLAG_TLS1_3_CIPHERS) | ||
| 348 | |||
| 345 | #define SSL_PKEY_RSA_ENC 0 | 349 | #define SSL_PKEY_RSA_ENC 0 |
| 346 | #define SSL_PKEY_RSA_SIGN 1 | 350 | #define SSL_PKEY_RSA_SIGN 1 |
| 347 | #define SSL_PKEY_DH_RSA 2 | 351 | #define SSL_PKEY_DH_RSA 2 |
| @@ -1046,6 +1050,9 @@ typedef struct ssl3_enc_method { | |||
| 1046 | /* Allow TLS 1.2 ciphersuites: applies to DTLS 1.2 as well as TLS 1.2. */ | 1050 | /* Allow TLS 1.2 ciphersuites: applies to DTLS 1.2 as well as TLS 1.2. */ |
| 1047 | #define SSL_ENC_FLAG_TLS1_2_CIPHERS (1 << 4) | 1051 | #define SSL_ENC_FLAG_TLS1_2_CIPHERS (1 << 4) |
| 1048 | 1052 | ||
| 1053 | /* Allow TLS 1.3 ciphersuites only. */ | ||
| 1054 | #define SSL_ENC_FLAG_TLS1_3_CIPHERS (1 << 5) | ||
| 1055 | |||
| 1049 | /* | 1056 | /* |
| 1050 | * ssl_aead_ctx_st contains information about an AEAD that is being used to | 1057 | * ssl_aead_ctx_st contains information about an AEAD that is being used to |
| 1051 | * encrypt an SSL connection. | 1058 | * encrypt an SSL connection. |
| @@ -1094,6 +1101,7 @@ extern SSL3_ENC_METHOD DTLSv1_enc_data; | |||
| 1094 | extern SSL3_ENC_METHOD TLSv1_enc_data; | 1101 | extern SSL3_ENC_METHOD TLSv1_enc_data; |
| 1095 | extern SSL3_ENC_METHOD TLSv1_1_enc_data; | 1102 | extern SSL3_ENC_METHOD TLSv1_1_enc_data; |
| 1096 | extern SSL3_ENC_METHOD TLSv1_2_enc_data; | 1103 | extern SSL3_ENC_METHOD TLSv1_2_enc_data; |
| 1104 | extern SSL3_ENC_METHOD TLSv1_3_enc_data; | ||
| 1097 | 1105 | ||
| 1098 | void ssl_clear_cipher_state(SSL *s); | 1106 | void ssl_clear_cipher_state(SSL *s); |
| 1099 | void ssl_clear_cipher_read_state(SSL *s); | 1107 | void ssl_clear_cipher_read_state(SSL *s); |
