Skip to content

Commit 755619c

Browse files
aglrvagg
authored andcommitted
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: #4913 Reviewed-By: Fedor Indutny <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent d6fbd81 commit 755619c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/node_crypto.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -5370,7 +5370,7 @@ void GetSSLCiphers(const FunctionCallbackInfo<Value>& args) {
53705370
STACK_OF(SSL_CIPHER)* ciphers = SSL_get_ciphers(ssl);
53715371

53725372
for (int i = 0; i < sk_SSL_CIPHER_num(ciphers); ++i) {
5373-
SSL_CIPHER* cipher = sk_SSL_CIPHER_value(ciphers, i);
5373+
const SSL_CIPHER* cipher = sk_SSL_CIPHER_value(ciphers, i);
53745374
arr->Set(i, OneByteString(args.GetIsolate(), SSL_CIPHER_get_name(cipher)));
53755375
}
53765376

0 commit comments

Comments
 (0)