Skip to content

Commit a08925d

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 <apapirovski@mac.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me>
1 parent 1553c73 commit a08925d

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
@@ -608,6 +608,8 @@ function onhandshakestart() {
608608
// state machine and OpenSSL is not re-entrant. We cannot allow the user's
609609
// callback to destroy the connection right now, it would crash and burn.
610610
setImmediate(function() {
611+
// Old-style error is not being migrated to the newer style
612+
// internal/errors.js because _tls_legacy.js has been deprecated.
611613
var err = new Error('TLS session renegotiation attack detected');
612614
if (self.cleartext) self.cleartext.emit('error', err);
613615
});

0 commit comments

Comments
 (0)