mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
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: https://github.com/nodejs/node/pull/28067 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
@@ -1335,12 +1335,14 @@ function onConnectSecure() {
|
||||
this.destroy(verifyError);
|
||||
return;
|
||||
} else {
|
||||
debug('client emit secureConnect');
|
||||
debug('client emit secureConnect. rejectUnauthorized: %s, ' +
|
||||
'authorizationError: %s', options.rejectUnauthorized,
|
||||
this.authorizationError);
|
||||
this.emit('secureConnect');
|
||||
}
|
||||
} else {
|
||||
this.authorized = true;
|
||||
debug('client emit secureConnect');
|
||||
debug('client emit secureConnect. authorized:', this.authorized);
|
||||
this.emit('secureConnect');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user