From 4d0ea60ac6503c7d3a5f326d4e265878f9b01c7e Mon Sep 17 00:00:00 2001 From: Juan Heyns Date: Tue, 16 Jan 2024 20:00:02 -0500 Subject: [PATCH] fix: add condition which allows code in callback to be reachable --- lib/connection.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/connection.js b/lib/connection.js index dcd841cc59..113fc7d46c 100644 --- a/lib/connection.js +++ b/lib/connection.js @@ -362,6 +362,9 @@ class Connection extends EventEmitter { const secureSocket = Tls.connect({ rejectUnauthorized, requestCert: rejectUnauthorized, + checkServerIdentity: verifyIdentity + ? Tls.checkServerIdentity + : function() { return undefined; }, secureContext, isServer: false, socket: this.stream,