-/* $OpenBSD: ssl_lib.c,v 1.291 2022/06/28 20:34:17 tb Exp $ */
+/* $OpenBSD: ssl_lib.c,v 1.292 2022/06/29 08:39:08 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
SSL_get1_supported_ciphers(SSL *s)
{
STACK_OF(SSL_CIPHER) *supported_ciphers = NULL, *ciphers;
- const SSL_CIPHER *cipher;
+ SSL_CIPHER *cipher;
uint16_t min_vers, max_vers;
int i;
if (!ssl_cipher_allowed_in_tls_version_range(cipher, min_vers,
max_vers))
continue;
+ if (!ssl_security(s, SSL_SECOP_CIPHER_SUPPORTED,
+ cipher->strength_bits, 0, cipher))
+ continue;
if (!sk_SSL_CIPHER_push(supported_ciphers, cipher))
goto err;
}