Skip to content

Commit 9c3302b

Browse files
aglMyles Borins
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 66ffc71 commit 9c3302b

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
@@ -5177,7 +5177,7 @@ void GetSSLCiphers(const FunctionCallbackInfo<Value>& args) {
51775177
STACK_OF(SSL_CIPHER)* ciphers = SSL_get_ciphers(ssl);
51785178

51795179
for (int i = 0; i < sk_SSL_CIPHER_num(ciphers); ++i) {
5180-
SSL_CIPHER* cipher = sk_SSL_CIPHER_value(ciphers, i);
5180+
const SSL_CIPHER* cipher = sk_SSL_CIPHER_value(ciphers, i);
51815181
arr->Set(i, OneByteString(args.GetIsolate(), SSL_CIPHER_get_name(cipher)));
51825182
}
51835183

0 commit comments

Comments
 (0)