Skip to content

Commit 3f1787b

Browse files
danbevBridgeAR
authored andcommitted
crypto: add debug info client emit secureConnect
Currently, when debugging a TLS connection there might be multiple debug statements 'client emit secureConnect' for the 'secureConnect` event when using NODE_DEBUG='tls'. While it is possible to step through this with a debugger that is not always the fastest/easiest to do if debugging remote code. This commit adds some additional information to the debug statements to make it easier to distinguish where the debug statements are coming from. PR-URL: #28067 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Yongsheng Zhang <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Rich Trott <[email protected]>
1 parent d1c53fc commit 3f1787b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/_tls_wrap.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -1335,12 +1335,14 @@ function onConnectSecure() {
13351335
this.destroy(verifyError);
13361336
return;
13371337
} else {
1338-
debug('client emit secureConnect');
1338+
debug('client emit secureConnect. rejectUnauthorized: %s, ' +
1339+
'authorizationError: %s', options.rejectUnauthorized,
1340+
this.authorizationError);
13391341
this.emit('secureConnect');
13401342
}
13411343
} else {
13421344
this.authorized = true;
1343-
debug('client emit secureConnect');
1345+
debug('client emit secureConnect. authorized:', this.authorized);
13441346
this.emit('secureConnect');
13451347
}
13461348

0 commit comments

Comments
 (0)