Skip to content

Commit

Permalink
crypto: use a const SSL_CIPHER
Browse files Browse the repository at this point in the history
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: #4913
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
agl authored and rvagg committed Feb 8, 2016
1 parent d6fbd81 commit 755619c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node_crypto.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)));
}

Expand Down

0 comments on commit 755619c

Please sign in to comment.