From 755619c55403af511a050dbaebc94b8dd730e7de 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 a27f97dc7407fe..0d88828bec1885 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -5370,7 +5370,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))); }