diff --git a/lib/_tls_wrap.js b/lib/_tls_wrap.js index fcd447bb590..b3c48b950c6 100644 --- a/lib/_tls_wrap.js +++ b/lib/_tls_wrap.js @@ -1055,7 +1055,7 @@ function onConnectSecure() { options.host || (options.socket && options.socket._host) || 'localhost'; - const cert = this.getPeerCertificate(); + const cert = this.getPeerCertificate(true); verifyError = options.checkServerIdentity(hostname, cert); }