diff options
Diffstat (limited to 'lib/tls.js')
-rw-r--r-- | lib/tls.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/tls.js b/lib/tls.js index 6d2f59e36c..a0d31bf601 100644 --- a/lib/tls.js +++ b/lib/tls.js @@ -51,7 +51,7 @@ exports.getCiphers = function() { // ("\x06spdy/2\x08http/1.1\x08http/1.0") exports.convertNPNProtocols = function convertNPNProtocols(NPNProtocols, out) { // If NPNProtocols is Array - translate it into buffer - if (Array.isArray(NPNProtocols)) { + if (IS_ARRAY(NPNProtocols)) { var buff = new Buffer(NPNProtocols.reduce(function(p, c) { return p + 1 + Buffer.byteLength(c); }, 0)); @@ -68,7 +68,7 @@ exports.convertNPNProtocols = function convertNPNProtocols(NPNProtocols, out) { } // If it's already a Buffer - store it - if (Buffer.isBuffer(NPNProtocols)) { + if (IS_BUFFER(NPNProtocols)) { out.NPNProtocols = NPNProtocols; } }; @@ -166,7 +166,7 @@ exports.checkServerIdentity = function checkServerIdentity(host, cert) { // RFC6125 if (matchCN) { var commonNames = cert.subject.CN; - if (Array.isArray(commonNames)) { + if (IS_ARRAY(commonNames)) { for (var i = 0, k = commonNames.length; i < k; ++i) { dnsNames.push(regexpify(commonNames[i], true)); } @@ -194,7 +194,7 @@ exports.parseCertString = function parseCertString(s) { var key = parts[i].slice(0, sepIndex); var value = parts[i].slice(sepIndex + 1); if (key in out) { - if (!Array.isArray(out[key])) { + if (!IS_ARRAY(out[key])) { out[key] = [out[key]]; } out[key].push(value); |