diff --git a/lib/connection.js b/lib/connection.js index 39469a309..799ab4ed8 100644 --- a/lib/connection.js +++ b/lib/connection.js @@ -94,7 +94,7 @@ Connection.prototype.connect = function (port, host) { self.stream = tls.connect({ socket: self.stream, servername: host, - checkServerIdentity: self.ssl.checkServerIdentity, + checkServerIdentity: self.ssl.checkServerIdentity || tls.checkServerIdentity, rejectUnauthorized: self.ssl.rejectUnauthorized, ca: self.ssl.ca, pfx: self.ssl.pfx,