summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_clnt.c
diff options
context:
space:
mode:
authorjsing <>2026-04-03 12:58:19 +0000
committerjsing <>2026-04-03 12:58:19 +0000
commit42d1ecbb4220b6260fa2da63402ec3f5cbad849a (patch)
tree54561e6b94ac4ffe54812d2ae61334aacbe86c53 /src/lib/libssl/ssl_clnt.c
parentd8c990b8ab23e4f390c5f883d8da8177ef804444 (diff)
downloadopenbsd-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_clnt.c')
-rw-r--r--src/lib/libssl/ssl_clnt.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lib/libssl/ssl_clnt.c b/src/lib/libssl/ssl_clnt.c
index 22469ce346..6ef81a1706 100644
--- a/src/lib/libssl/ssl_clnt.c
+++ b/src/lib/libssl/ssl_clnt.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_clnt.c,v 1.170 2025/12/04 21:03:42 beck Exp $ */ 1/* $OpenBSD: ssl_clnt.c,v 1.171 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 *
@@ -233,6 +233,13 @@ ssl3_connect(SSL *s)
233 goto end; 233 goto end;
234 } 234 }
235 235
236 /* Ensure that we cannot negotiate TLSv1.1 or lower. */
237 if (s->s3->hs.our_min_tls_version < TLS1_2_VERSION) {
238 SSLerror(s, ERR_R_INTERNAL_ERROR);
239 ret = -1;
240 goto end;
241 }
242
236 if (!ssl_security_version(s, 243 if (!ssl_security_version(s,
237 s->s3->hs.our_min_tls_version)) { 244 s->s3->hs.our_min_tls_version)) {
238 SSLerror(s, SSL_R_VERSION_TOO_LOW); 245 SSLerror(s, SSL_R_VERSION_TOO_LOW);