diff options
Diffstat (limited to 'src/lib/libssl/ssl_ciphers.c')
| -rw-r--r-- | src/lib/libssl/ssl_ciphers.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/lib/libssl/ssl_ciphers.c b/src/lib/libssl/ssl_ciphers.c index d13ce7a9c5..478238bd10 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.5 2020/09/11 15:28:07 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_ciphers.c,v 1.6 2020/09/11 17:36:27 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,6 +23,19 @@ | |||
| 23 | #include "ssl_locl.h" | 23 | #include "ssl_locl.h" |
| 24 | 24 | ||
| 25 | int | 25 | int |
| 26 | ssl_cipher_in_list(STACK_OF(SSL_CIPHER) *ciphers, const SSL_CIPHER *cipher) | ||
| 27 | { | ||
| 28 | int i; | ||
| 29 | |||
| 30 | for (i = 0; i < sk_SSL_CIPHER_num(ciphers); i++) { | ||
| 31 | if (sk_SSL_CIPHER_value(ciphers, i)->id == cipher->id) | ||
| 32 | return 1; | ||
| 33 | } | ||
| 34 | |||
| 35 | return 0; | ||
| 36 | } | ||
| 37 | |||
| 38 | int | ||
| 26 | ssl_cipher_allowed_in_version_range(const SSL_CIPHER *cipher, uint16_t min_ver, | 39 | ssl_cipher_allowed_in_version_range(const SSL_CIPHER *cipher, uint16_t min_ver, |
| 27 | uint16_t max_ver) | 40 | uint16_t max_ver) |
| 28 | { | 41 | { |
