Skip to content

Commit 7de137f

Browse files
matthiasakbrianc
authored andcommitted
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 4905471 cc @tobio @brianc
1 parent 83ede28 commit 7de137f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/connection.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ Connection.prototype.connect = function (port, host) {
9494
self.stream = tls.connect({
9595
socket: self.stream,
9696
servername: host,
97-
checkServerIdentity: self.ssl.checkServerIdentity,
97+
checkServerIdentity: self.ssl.checkServerIdentity || tls.checkServerIdentity,
9898
rejectUnauthorized: self.ssl.rejectUnauthorized,
9999
ca: self.ssl.ca,
100100
pfx: self.ssl.pfx,

0 commit comments

Comments
 (0)