diff options
Diffstat (limited to 'src/lib/libssl/ssl_versions.c')
| -rw-r--r-- | src/lib/libssl/ssl_versions.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/lib/libssl/ssl_versions.c b/src/lib/libssl/ssl_versions.c index fbc0004f4b..8273546062 100644 --- a/src/lib/libssl/ssl_versions.c +++ b/src/lib/libssl/ssl_versions.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ssl_versions.c,v 1.26 2022/11/26 16:08:56 tb Exp $ */ | 1 | /* $OpenBSD: ssl_versions.c,v 1.27 2023/07/02 17:21:32 beck Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2016, 2017 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2016, 2017 Joel Sing <jsing@openbsd.org> |
| 4 | * | 4 | * |
| @@ -150,11 +150,7 @@ ssl_enabled_tls_version_range(SSL *s, uint16_t *min_ver, uint16_t *max_ver) | |||
| 150 | options |= SSL_OP_NO_TLSv1 | SSL_OP_NO_TLSv1_2; | 150 | options |= SSL_OP_NO_TLSv1 | SSL_OP_NO_TLSv1_2; |
| 151 | } | 151 | } |
| 152 | 152 | ||
| 153 | if ((options & SSL_OP_NO_TLSv1) == 0) | 153 | if ((options & SSL_OP_NO_TLSv1_2) == 0) |
| 154 | min_version = TLS1_VERSION; | ||
| 155 | else if ((options & SSL_OP_NO_TLSv1_1) == 0) | ||
| 156 | min_version = TLS1_1_VERSION; | ||
| 157 | else if ((options & SSL_OP_NO_TLSv1_2) == 0) | ||
| 158 | min_version = TLS1_2_VERSION; | 154 | min_version = TLS1_2_VERSION; |
| 159 | else if ((options & SSL_OP_NO_TLSv1_3) == 0) | 155 | else if ((options & SSL_OP_NO_TLSv1_3) == 0) |
| 160 | min_version = TLS1_3_VERSION; | 156 | min_version = TLS1_3_VERSION; |
| @@ -162,10 +158,6 @@ ssl_enabled_tls_version_range(SSL *s, uint16_t *min_ver, uint16_t *max_ver) | |||
| 162 | if ((options & SSL_OP_NO_TLSv1_3) && min_version < TLS1_3_VERSION) | 158 | if ((options & SSL_OP_NO_TLSv1_3) && min_version < TLS1_3_VERSION) |
| 163 | max_version = TLS1_2_VERSION; | 159 | max_version = TLS1_2_VERSION; |
| 164 | if ((options & SSL_OP_NO_TLSv1_2) && min_version < TLS1_2_VERSION) | 160 | if ((options & SSL_OP_NO_TLSv1_2) && min_version < TLS1_2_VERSION) |
| 165 | max_version = TLS1_1_VERSION; | ||
| 166 | if ((options & SSL_OP_NO_TLSv1_1) && min_version < TLS1_1_VERSION) | ||
| 167 | max_version = TLS1_VERSION; | ||
| 168 | if ((options & SSL_OP_NO_TLSv1) && min_version < TLS1_VERSION) | ||
| 169 | max_version = 0; | 161 | max_version = 0; |
| 170 | 162 | ||
| 171 | /* Everything has been disabled... */ | 163 | /* Everything has been disabled... */ |
