Skip to content

Commit ea2c2e6

Browse files
committed
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.
1 parent c3bb4b1 commit ea2c2e6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/node_crypto.cc

Lines changed: 1 addition & 1 deletion
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)