diff options
author | isaacs <i@izs.me> | 2013-07-27 01:38:08 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2013-08-02 02:08:01 +0400 |
commit | 22c68fdc1dae40f0ed9c71a02f66e5b2c6353691 (patch) | |
tree | b6d14cad6f5a9ba78172f77c5c2ec10b8a6cb89c /lib/tls.js | |
parent | 9a29aa8c552eb2b120c101c1cfd66ba565a17ed5 (diff) |
src: Replace macros with util functions
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 a0d31bf6013..ab8d665a261 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 (IS_ARRAY(NPNProtocols)) { + if (util.isArray(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 (IS_BUFFER(NPNProtocols)) { + if (util.isBuffer(NPNProtocols)) { out.NPNProtocols = NPNProtocols; } }; @@ -166,7 +166,7 @@ exports.checkServerIdentity = function checkServerIdentity(host, cert) { // RFC6125 if (matchCN) { var commonNames = cert.subject.CN; - if (IS_ARRAY(commonNames)) { + if (util.isArray(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 (!IS_ARRAY(out[key])) { + if (!util.isArray(out[key])) { out[key] = [out[key]]; } out[key].push(value); |