diff --git a/lib/crypto.js b/lib/crypto.js index 76d0f9e6d02..70d463c354d 100644 --- a/lib/crypto.js +++ b/lib/crypto.js @@ -49,7 +49,7 @@ exports.createCredentials = function (options) { if (options.ca) { c.shouldVerify = true; - if ( (typeof(options.ca) == 'object') && options.ca.length ) { + if (Array.isArray(options.ca)) { for (var i = 0, len = options.ca.length; i < len; i++) { c.context.addCACert(options.ca[i]); }