Better array check in Cert Authority list
This commit is contained in:
parent
855210ce0b
commit
89e398f075
@ -49,7 +49,7 @@ exports.createCredentials = function (options) {
|
|||||||
|
|
||||||
if (options.ca) {
|
if (options.ca) {
|
||||||
c.shouldVerify = true;
|
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++) {
|
for (var i = 0, len = options.ca.length; i < len; i++) {
|
||||||
c.context.addCACert(options.ca[i]);
|
c.context.addCACert(options.ca[i]);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user