summaryrefslogtreecommitdiff
path: root/lib/tls.js
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2013-07-26 14:38:08 -0700
committerisaacs <i@izs.me>2013-08-01 15:08:01 -0700
commit22c68fdc1dae40f0ed9c71a02f66e5b2c6353691 (patch)
treeb6d14cad6f5a9ba78172f77c5c2ec10b8a6cb89c /lib/tls.js
parent9a29aa8c552eb2b120c101c1cfd66ba565a17ed5 (diff)
downloadandroid-node-v8-22c68fdc1dae40f0ed9c71a02f66e5b2c6353691.tar.gz
android-node-v8-22c68fdc1dae40f0ed9c71a02f66e5b2c6353691.tar.bz2
android-node-v8-22c68fdc1dae40f0ed9c71a02f66e5b2c6353691.zip
src: Replace macros with util functions
Diffstat (limited to 'lib/tls.js')
-rw-r--r--lib/tls.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/tls.js b/lib/tls.js
index a0d31bf601..ab8d665a26 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);