Skip to content

Commit b44f245

Browse files
Xavier-J-OrtizMylesBorins
authored andcommitted
tls: comment about old-style errors
Old style errors are being migrated to internal/errors.js, however, due to depreciation of _tls_legacy.js, it isn't worth the effort to migrate and potentially force users to update their code for this error change. This comment clarifies the reason why this error is not migrated. PR-URL: #17759 Refs: #17709 Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Jon Moss <[email protected]>
1 parent 112b655 commit b44f245

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/_tls_legacy.js

+2
Original file line numberDiff line numberDiff line change
@@ -632,6 +632,8 @@ function onhandshakestart() {
632632
// state machine and OpenSSL is not re-entrant. We cannot allow the user's
633633
// callback to destroy the connection right now, it would crash and burn.
634634
setImmediate(function() {
635+
// Old-style error is not being migrated to the newer style
636+
// internal/errors.js because _tls_legacy.js has been deprecated.
635637
var err = new Error('TLS session renegotiation attack detected');
636638
if (self.cleartext) self.cleartext.emit('error', err);
637639
});

0 commit comments

Comments
 (0)