From b8e1089df00bbd9dab0d6f831246727d0a552478 Mon Sep 17 00:00:00 2001 From: Adam Langley Date: Wed, 27 Jan 2016 10:58:09 -0800 Subject: [PATCH] crypto: use a const SSL_CIPHER SSL_CIPHER objects are conceptually const in any case and this allows STACK_OF(SSL_CIPHER) to return a const pointer, as is done in BoringSSL and, perhaps, OpenSSL in the future. PR-URL: https://github.com/nodejs/node/pull/4913 Reviewed-By: Fedor Indutny Reviewed-By: James M Snell --- src/node_crypto.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node_crypto.cc b/src/node_crypto.cc index c6f8fad4ed6754..053e6970c377cb 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -5177,7 +5177,7 @@ void GetSSLCiphers(const FunctionCallbackInfo& args) { STACK_OF(SSL_CIPHER)* ciphers = SSL_get_ciphers(ssl); for (int i = 0; i < sk_SSL_CIPHER_num(ciphers); ++i) { - SSL_CIPHER* cipher = sk_SSL_CIPHER_value(ciphers, i); + const SSL_CIPHER* cipher = sk_SSL_CIPHER_value(ciphers, i); arr->Set(i, OneByteString(args.GetIsolate(), SSL_CIPHER_get_name(cipher))); }