Skip to content

Commit dd23cd2

Browse files
authored
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 <chlily@google.com> PR-URL: #67443 Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Tim Perry <pimterry@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent bd08ba3 commit dd23cd2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎deps/ncrypto/ncrypto.cc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5213,7 +5213,7 @@ SSLPointer SSLPointer::New(const SSLCtxPointer& ctx) {
52135213

52145214
void SSLPointer::getCiphers(std::function<void(const char*)> cb) const {
52155215
if (!ssl_) return;
5216-
STACK_OF(SSL_CIPHER)* ciphers = SSL_get_ciphers(get());
5216+
const STACK_OF(SSL_CIPHER)* ciphers = SSL_get_ciphers(get());
52175217

52185218
// TLSv1.3 ciphers aren't listed by EVP. There are only 5, we could just
52195219
// document them, but since there are only 5, easier to just add them manually

0 commit comments

Comments
 (0)