diff options
Diffstat (limited to 'lib/_tls_common.js')
-rw-r--r-- | lib/_tls_common.js | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/_tls_common.js b/lib/_tls_common.js index 13ff850c99..e4180a2f4d 100644 --- a/lib/_tls_common.js +++ b/lib/_tls_common.js @@ -22,6 +22,7 @@ 'use strict'; const { + ArrayIsArray, ObjectCreate, } = primordials; @@ -105,7 +106,7 @@ exports.createSecureContext = function createSecureContext(options) { // Add CA before the cert to be able to load cert's issuer in C++ code. const { ca } = options; if (ca) { - if (Array.isArray(ca)) { + if (ArrayIsArray(ca)) { for (i = 0; i < ca.length; ++i) { val = ca[i]; validateKeyOrCertOption('ca', val); @@ -121,7 +122,7 @@ exports.createSecureContext = function createSecureContext(options) { const { cert } = options; if (cert) { - if (Array.isArray(cert)) { + if (ArrayIsArray(cert)) { for (i = 0; i < cert.length; ++i) { val = cert[i]; validateKeyOrCertOption('cert', val); @@ -140,7 +141,7 @@ exports.createSecureContext = function createSecureContext(options) { const key = options.key; const passphrase = options.passphrase; if (key) { - if (Array.isArray(key)) { + if (ArrayIsArray(key)) { for (i = 0; i < key.length; ++i) { val = key[i]; // eslint-disable-next-line eqeqeq @@ -240,7 +241,7 @@ exports.createSecureContext = function createSecureContext(options) { } if (options.crl) { - if (Array.isArray(options.crl)) { + if (ArrayIsArray(options.crl)) { for (i = 0; i < options.crl.length; i++) { c.context.addCRL(options.crl[i]); } @@ -257,7 +258,7 @@ exports.createSecureContext = function createSecureContext(options) { if (!toBuf) toBuf = require('internal/crypto/util').toBuf; - if (Array.isArray(options.pfx)) { + if (ArrayIsArray(options.pfx)) { for (i = 0; i < options.pfx.length; i++) { const pfx = options.pfx[i]; const raw = pfx.buf ? pfx.buf : pfx; |