From 8d5b903f5c24ef6378d4aa98d3fd4e13d39be4db Mon Sep 17 00:00:00 2001 From: Juan Heyns Date: Wed, 17 Jan 2024 17:25:22 -0500 Subject: [PATCH] fix: add condition which allows code in callback to be reachable (#2376) Co-authored-by: Juan Heyns --- 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,