From 67f84b876961b1e24996770cf9a07d5c511287af Mon Sep 17 00:00:00 2001 From: tb Date: Wed, 29 Jun 2022 08:38:01 +0000 Subject: [PATCH] Check security level when convertin a cipher list to bytes ok beck jsing --- lib/libssl/ssl_ciphers.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/libssl/ssl_ciphers.c b/lib/libssl/ssl_ciphers.c index 3174ae9c268..99f23dff4bd 100644 --- a/lib/libssl/ssl_ciphers.c +++ b/lib/libssl/ssl_ciphers.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_ciphers.c,v 1.13 2022/02/05 18:18:18 tb Exp $ */ +/* $OpenBSD: ssl_ciphers.c,v 1.14 2022/06/29 08:38:01 tb Exp $ */ /* * Copyright (c) 2015-2017 Doug Hogan * Copyright (c) 2015-2018, 2020 Joel Sing @@ -70,6 +70,9 @@ ssl_cipher_list_to_bytes(SSL *s, STACK_OF(SSL_CIPHER) *ciphers, CBB *cbb) if (!ssl_cipher_allowed_in_tls_version_range(cipher, min_vers, max_vers)) continue; + if (!ssl_security(s, SSL_SECOP_CIPHER_CHECK, + cipher->strength_bits, 0, cipher)) + continue; if (!CBB_add_u16(cbb, ssl3_cipher_get_value(cipher))) return 0; -- 2.20.1