diff options
author | jsing <> | 2021-06-27 16:54:14 +0000 |
---|---|---|
committer | jsing <> | 2021-06-27 16:54:14 +0000 |
commit | 33abfd8dd82d32943832cfb605ff548b4516ae04 (patch) | |
tree | 8744e82b4d46481f9e4d39e2935aaa9b9de38ec9 | |
parent | a2e788d74b3e0fbf66037bde6e1a270976a45b6b (diff) | |
download | openbsd-33abfd8dd82d32943832cfb605ff548b4516ae04.tar.gz openbsd-33abfd8dd82d32943832cfb605ff548b4516ae04.tar.bz2 openbsd-33abfd8dd82d32943832cfb605ff548b4516ae04.zip |
Correct handling of SSL_OP_NO_DTLSv1.
When converting to TLS flags, we need to also include SSL_OP_NO_TLSv1,
otherwise the TLS equivalent of SSL_OP_NO_DTLSv1 is TLSv1.0 only, which
does not work so well when we try to switch back to DTLS versions.
-rw-r--r-- | src/lib/libssl/ssl_versions.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libssl/ssl_versions.c b/src/lib/libssl/ssl_versions.c index 0d8487d577..68e69ebca3 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.18 2021/03/19 19:52:55 tb Exp $ */ | 1 | /* $OpenBSD: ssl_versions.c,v 1.19 2021/06/27 16:54:14 jsing 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 | * |
@@ -145,9 +145,9 @@ ssl_enabled_tls_version_range(SSL *s, uint16_t *min_ver, uint16_t *max_ver) | |||
145 | if (SSL_is_dtls(s)) { | 145 | if (SSL_is_dtls(s)) { |
146 | options = 0; | 146 | options = 0; |
147 | if (s->internal->options & SSL_OP_NO_DTLSv1) | 147 | if (s->internal->options & SSL_OP_NO_DTLSv1) |
148 | options |= SSL_OP_NO_TLSv1_1; | 148 | options |= SSL_OP_NO_TLSv1 | SSL_OP_NO_TLSv1_1; |
149 | if (s->internal->options & SSL_OP_NO_DTLSv1_2) | 149 | if (s->internal->options & SSL_OP_NO_DTLSv1_2) |
150 | options |= 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) == 0) |