diff options
Diffstat (limited to 'src/lib/libssl/s3_lib.c')
-rw-r--r-- | src/lib/libssl/s3_lib.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/lib/libssl/s3_lib.c b/src/lib/libssl/s3_lib.c index 9adf257ff3..252242e053 100644 --- a/src/lib/libssl/s3_lib.c +++ b/src/lib/libssl/s3_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: s3_lib.c,v 1.188 2020/01/02 06:37:13 jsing Exp $ */ | 1 | /* $OpenBSD: s3_lib.c,v 1.189 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 | * |
@@ -2502,6 +2502,16 @@ ssl3_choose_cipher(SSL *s, STACK_OF(SSL_CIPHER) *clnt, | |||
2502 | !SSL_USE_TLS1_2_CIPHERS(s)) | 2502 | !SSL_USE_TLS1_2_CIPHERS(s)) |
2503 | continue; | 2503 | continue; |
2504 | 2504 | ||
2505 | /* Skip TLS v1.3 only ciphersuites if not supported. */ | ||
2506 | if ((c->algorithm_ssl & SSL_TLSV1_3) && | ||
2507 | !SSL_USE_TLS1_3_CIPHERS(s)) | ||
2508 | continue; | ||
2509 | |||
2510 | /* If TLS v1.3, only allow TLS v1.3 ciphersuites. */ | ||
2511 | if (SSL_USE_TLS1_3_CIPHERS(s) && | ||
2512 | !(c->algorithm_ssl & SSL_TLSV1_3)) | ||
2513 | continue; | ||
2514 | |||
2505 | ssl_set_cert_masks(cert, c); | 2515 | ssl_set_cert_masks(cert, c); |
2506 | mask_k = cert->mask_k; | 2516 | mask_k = cert->mask_k; |
2507 | mask_a = cert->mask_a; | 2517 | mask_a = cert->mask_a; |
@@ -2509,7 +2519,6 @@ ssl3_choose_cipher(SSL *s, STACK_OF(SSL_CIPHER) *clnt, | |||
2509 | alg_k = c->algorithm_mkey; | 2519 | alg_k = c->algorithm_mkey; |
2510 | alg_a = c->algorithm_auth; | 2520 | alg_a = c->algorithm_auth; |
2511 | 2521 | ||
2512 | |||
2513 | ok = (alg_k & mask_k) && (alg_a & mask_a); | 2522 | ok = (alg_k & mask_k) && (alg_a & mask_a); |
2514 | 2523 | ||
2515 | /* | 2524 | /* |