From 75451ce80f80d8822f817fcd94629e31e371306e Mon Sep 17 00:00:00 2001 From: Matt Keas Date: Sat, 5 May 2018 09:47:34 -0500 Subject: [PATCH] tls.connect({checkServerIdentity}) option cannot be a null - must be a method or not exist. Defaults to built-in `tls.checkServerIdentity` method in the event one is not passed into `pgConfig.ssl` Found breaking in v9.4.2 vs v9.4.1 a la 49054717b4ec0c6d477f04c2becd1f9680b2d13a cc @tobio @brianc --- lib/connection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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,