summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdam Langley <agl@google.com>2016-01-27 10:58:09 -0800
committerFedor Indutny <fedor@indutny.com>2016-01-27 17:28:51 -0500
commitf8d24c54a85383411443f0ce929bca59022a4276 (patch)
treee296924b520a05e8149398112a0ea6957b3a5219 /src
parentff4006c7b05d677f6b63f01ad9c5faf97e0230bd (diff)
downloadnode-new-f8d24c54a85383411443f0ce929bca59022a4276.tar.gz
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 <fedor@indutny.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/node_crypto.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/node_crypto.cc b/src/node_crypto.cc
index a27f97dc74..0d88828bec 100644
--- a/src/node_crypto.cc
+++ b/src/node_crypto.cc
@@ -5370,7 +5370,7 @@ void GetSSLCiphers(const FunctionCallbackInfo<Value>& 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)));
}