diff options
| author | jsing <> | 2026-04-03 12:58:19 +0000 |
|---|---|---|
| committer | jsing <> | 2026-04-03 12:58:19 +0000 |
| commit | 42d1ecbb4220b6260fa2da63402ec3f5cbad849a (patch) | |
| tree | 54561e6b94ac4ffe54812d2ae61334aacbe86c53 /src/lib/libssl/ssl_methods.c | |
| parent | d8c990b8ab23e4f390c5f883d8da8177ef804444 (diff) | |
| download | openbsd-42d1ecbb4220b6260fa2da63402ec3f5cbad849a.tar.gz openbsd-42d1ecbb4220b6260fa2da63402ec3f5cbad849a.tar.bz2 openbsd-42d1ecbb4220b6260fa2da63402ec3f5cbad849a.zip | |
Ensure that we cannot negotiate TLSv1.1 or lower.
TLS versions prior to TLSv1.2 were disabled a while ago, however this
was done in the version handling code. Remove TLSv1.1 and earlier from
ssl_get_method() and add an explicit min version check in the legacy
client and server, to provide a stronger guarantee.
ok kenjiro@ tb@
Diffstat (limited to 'src/lib/libssl/ssl_methods.c')
| -rw-r--r-- | src/lib/libssl/ssl_methods.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/lib/libssl/ssl_methods.c b/src/lib/libssl/ssl_methods.c index dee52decf1..dd620c1008 100644 --- a/src/lib/libssl/ssl_methods.c +++ b/src/lib/libssl/ssl_methods.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ssl_methods.c,v 1.32 2024/07/23 14:40:54 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_methods.c,v 1.33 2026/04/03 12:58:19 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 | * |
| @@ -538,17 +538,11 @@ const SSL_METHOD * | |||
| 538 | ssl_get_method(uint16_t version) | 538 | ssl_get_method(uint16_t version) |
| 539 | { | 539 | { |
| 540 | if (version == TLS1_3_VERSION) | 540 | if (version == TLS1_3_VERSION) |
| 541 | return (TLS_method()); | 541 | return TLS_method(); |
| 542 | if (version == TLS1_2_VERSION) | 542 | if (version == TLS1_2_VERSION) |
| 543 | return (TLSv1_2_method()); | 543 | return TLSv1_2_method(); |
| 544 | if (version == TLS1_1_VERSION) | ||
| 545 | return (TLSv1_1_method()); | ||
| 546 | if (version == TLS1_VERSION) | ||
| 547 | return (TLSv1_method()); | ||
| 548 | if (version == DTLS1_VERSION) | ||
| 549 | return (DTLSv1_method()); | ||
| 550 | if (version == DTLS1_2_VERSION) | 544 | if (version == DTLS1_2_VERSION) |
| 551 | return (DTLSv1_2_method()); | 545 | return DTLSv1_2_method(); |
| 552 | 546 | ||
| 553 | return (NULL); | 547 | return NULL; |
| 554 | } | 548 | } |
