8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8b5485d commit f989681 8000 Copy full SHA for f989681
src/node_crypto.cc
@@ -4835,10 +4835,11 @@ void GetSSLCiphers(const FunctionCallbackInfo<Value>& args) {
4835
SSLPointer ssl(SSL_new(ctx.get()));
4836
CHECK(ssl);
4837
4838
- Local<Array> arr = Array::New(env->isolate());
4839
STACK_OF(SSL_CIPHER)* ciphers = SSL_get_ciphers(ssl.get());
+ int n = sk_SSL_CIPHER_num(ciphers);
4840
+ Local<Array> arr = Array::New(env->isolate(), n);
4841
- for (int i = 0; i < sk_SSL_CIPHER_num(ciphers); ++i) {
4842
+ for (int i = 0; i < n; ++i) {
4843
const SSL_CIPHER* cipher = sk_SSL_CIPHER_value(ciphers, i);
4844
arr->Set(env->context(),
4845
i,
0 commit comments