You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Make SSL_get_ciphers() results const in Modules/_ssl.c #162141
Modules/_ssl.c stores results from SSL_get_ciphers() in non-const STACK_OF(SSL_CIPHER) * variables in two places:
server_ciphers in _ssl__SSLSocket_shared_ciphers_impl (*)
sk in _ssl__SSLContext_get_ciphers_impl
Both variables should be const: they are not modified, and are only read via sk_SSL_CIPHER_num() / sk_SSL_CIPHER_value(), which already take a const stack in OpenSSL and AWS-LC, so declaring them const is a no-op for existing builds.
(*) The client_ciphers variable immediately below this has to stay non-const for now, because OpenSSL's sk_SSL_CIPHER_find() still takes a non-const stack (openssl/openssl#33707).
Motivation: Though BoringSSL is not supported per PEP 644, this const-correctness change would be aligned with BoringSSL's planned changes to SSL_get_ciphers() and SSL_CTX_get_ciphers() to return const STACK_OF(SSL_CIPHER) * (see https://crbug.com/550501994).
Activity