diff options
| author | jsing <> | 2026-07-15 15:00:17 +0000 |
|---|---|---|
| committer | jsing <> | 2026-07-15 15:00:17 +0000 |
| commit | cf7a40bb11f97c00986c060585e3bc517ff3b9fb (patch) | |
| tree | 05dfc68d072af6fc1a06924dc30559cfda5540a3 | |
| parent | 67e537385476e1b11b775ac95776aab10f730fcf (diff) | |
| download | openbsd-cf7a40bb11f97c00986c060585e3bc517ff3b9fb.tar.gz openbsd-cf7a40bb11f97c00986c060585e3bc517ff3b9fb.tar.bz2 openbsd-cf7a40bb11f97c00986c060585e3bc517ff3b9fb.zip | |
Check that the server selected ciphersuite is valid for use with TLSv1.2.
In the legacy stack, ensure that the server selected ciphersuite is valid
for use with TLSv1.2 - this effectively means that it is not a TLSv1.3
ciphersuite. We currently fail the handshake, but at a later stage.
Reported by Tom Gouville from the tlspuffin team.
ok tb@
| -rw-r--r-- | src/lib/libssl/ssl_clnt.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/lib/libssl/ssl_clnt.c b/src/lib/libssl/ssl_clnt.c index d9fdfff2a3..4803e35dd2 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.174 2026/07/15 13:56:38 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_clnt.c,v 1.175 2026/07/15 15:00:17 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 | * |
| @@ -1010,6 +1010,15 @@ ssl3_get_server_hello(SSL *s) | |||
| 1010 | goto fatal_err; | 1010 | goto fatal_err; |
| 1011 | } | 1011 | } |
| 1012 | 1012 | ||
| 1013 | /* Require a ciphersuite that can be used with TLSv1.2. */ | ||
| 1014 | if (cipher->algorithm_ssl != SSL_SSLV3 && | ||
| 1015 | cipher->algorithm_ssl != SSL_TLSV1 && | ||
| 1016 | cipher->algorithm_ssl != SSL_TLSV1_2) { | ||
| 1017 | al = SSL_AD_ILLEGAL_PARAMETER; | ||
| 1018 | SSLerror(s, SSL_R_WRONG_CIPHER_RETURNED); | ||
| 1019 | goto fatal_err; | ||
| 1020 | } | ||
| 1021 | |||
| 1013 | /* | 1022 | /* |
| 1014 | * Depending on the session caching (internal/external), the cipher | 1023 | * Depending on the session caching (internal/external), the cipher |
| 1015 | * and/or cipher_id values may not be set. Make sure that | 1024 | * and/or cipher_id values may not be set. Make sure that |
