summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_locl.h
diff options
context:
space:
mode:
authorjsing <>2020-01-23 10:40:59 +0000
committerjsing <>2020-01-23 10:40:59 +0000
commit3738bd24e9d4a33d52a585206262895bd6893bf4 (patch)
tree43dc459859c1fb1a2702abab83aea4b376e97893 /src/lib/libssl/ssl_locl.h
parent8d4bd61260ee3ef0237ff103fbfa530c1c352552 (diff)
downloadopenbsd-3738bd24e9d4a33d52a585206262895bd6893bf4.tar.gz
openbsd-3738bd24e9d4a33d52a585206262895bd6893bf4.tar.bz2
openbsd-3738bd24e9d4a33d52a585206262895bd6893bf4.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 'src/lib/libssl/ssl_locl.h')
-rw-r--r--src/lib/libssl/ssl_locl.h10
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;
1094extern SSL3_ENC_METHOD TLSv1_enc_data; 1101extern SSL3_ENC_METHOD TLSv1_enc_data;
1095extern SSL3_ENC_METHOD TLSv1_1_enc_data; 1102extern SSL3_ENC_METHOD TLSv1_1_enc_data;
1096extern SSL3_ENC_METHOD TLSv1_2_enc_data; 1103extern SSL3_ENC_METHOD TLSv1_2_enc_data;
1104extern SSL3_ENC_METHOD TLSv1_3_enc_data;
1097 1105
1098void ssl_clear_cipher_state(SSL *s); 1106void ssl_clear_cipher_state(SSL *s);
1099void ssl_clear_cipher_read_state(SSL *s); 1107void ssl_clear_cipher_read_state(SSL *s);