From a5f1431e39cbded1e4065b10953b472a899f321c Mon Sep 17 00:00:00 2001 From: Lily Chen Date: Thu, 12 Nov 2026 19:26:14 +0000 Subject: [PATCH] crypto: use const STACK_OF(SSL_CIPHER)* for SSL_get_ciphers BoringSSL is updating SSL_get_ciphers and SSL_CTX_get_ciphers to return const STACK_OF(SSL_CIPHER)* instead of a non-const pointer. Declare the local ciphers variable in SSLPointer::getCiphers as const so it builds cleanly against both OpenSSL and BoringSSL. Refs: https://crbug.com/550501994 Signed-off-by: Lily Chen --- deps/ncrypto/ncrypto.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/ncrypto/ncrypto.cc b/deps/ncrypto/ncrypto.cc index ba800fa816c4..11fff074f011 100644 --- a/deps/ncrypto/ncrypto.cc +++ b/deps/ncrypto/ncrypto.cc @@ -5194,7 +5194,7 @@ SSLPointer SSLPointer::New(const SSLCtxPointer& ctx) { void SSLPointer::getCiphers(std::function cb) const { if (!ssl_) return; - STACK_OF(SSL_CIPHER)* ciphers = SSL_get_ciphers(get()); + const STACK_OF(SSL_CIPHER)* ciphers = SSL_get_ciphers(get()); // TLSv1.3 ciphers aren't listed by EVP. There are only 5, we could just // document them, but since there are only 5, easier to just add them manually