diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libssl/ssl_ciphers.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/lib/libssl/ssl_ciphers.c b/src/lib/libssl/ssl_ciphers.c index 3a1fb14d5c..d13ce7a9c5 100644 --- a/src/lib/libssl/ssl_ciphers.c +++ b/src/lib/libssl/ssl_ciphers.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ssl_ciphers.c,v 1.4 2020/05/31 18:03:32 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_ciphers.c,v 1.5 2020/09/11 15:28:07 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2015-2017 Doug Hogan <doug@openbsd.org> | 3 | * Copyright (c) 2015-2017 Doug Hogan <doug@openbsd.org> |
| 4 | * Copyright (c) 2015-2018 Joel Sing <jsing@openbsd.org> | 4 | * Copyright (c) 2015-2018 Joel Sing <jsing@openbsd.org> |
| @@ -23,7 +23,7 @@ | |||
| 23 | #include "ssl_locl.h" | 23 | #include "ssl_locl.h" |
| 24 | 24 | ||
| 25 | int | 25 | int |
| 26 | ssl_cipher_is_permitted(const SSL_CIPHER *cipher, uint16_t min_ver, | 26 | ssl_cipher_allowed_in_version_range(const SSL_CIPHER *cipher, uint16_t min_ver, |
| 27 | uint16_t max_ver) | 27 | uint16_t max_ver) |
| 28 | { | 28 | { |
| 29 | /* XXX: We only support DTLSv1 which is effectively TLSv1.1 */ | 29 | /* XXX: We only support DTLSv1 which is effectively TLSv1.1 */ |
| @@ -65,10 +65,9 @@ ssl_cipher_list_to_bytes(SSL *s, STACK_OF(SSL_CIPHER) *ciphers, CBB *cbb) | |||
| 65 | for (i = 0; i < sk_SSL_CIPHER_num(ciphers); i++) { | 65 | for (i = 0; i < sk_SSL_CIPHER_num(ciphers); i++) { |
| 66 | if ((cipher = sk_SSL_CIPHER_value(ciphers, i)) == NULL) | 66 | if ((cipher = sk_SSL_CIPHER_value(ciphers, i)) == NULL) |
| 67 | return 0; | 67 | return 0; |
| 68 | 68 | if (!ssl_cipher_allowed_in_version_range(cipher, min_vers, | |
| 69 | if (!ssl_cipher_is_permitted(cipher, min_vers, max_vers)) | 69 | max_vers)) |
| 70 | continue; | 70 | continue; |
| 71 | |||
| 72 | if (!CBB_add_u16(cbb, ssl3_cipher_get_value(cipher))) | 71 | if (!CBB_add_u16(cbb, ssl3_cipher_get_value(cipher))) |
| 73 | return 0; | 72 | return 0; |
| 74 | 73 | ||
