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 <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
agl authored and Myles Borins committed Feb 18, 2016
1 parent d9c22cc commit b8e1089
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 @@ -5177,7 +5177,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 b8e1089

Please sign in to comment.