Skip to content

Commit

Permalink
tls: comment about old-style errors
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Xavier-J-Ortiz authored and gibfahn committed Jan 24, 2018
1 parent 964850a commit d2138b2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/_tls_legacy.js
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,8 @@ function onhandshakestart() {
// state machine and OpenSSL is not re-entrant. We cannot allow the user's
// callback to destroy the connection right now, it would crash and burn.
setImmediate(function() {
// Old-style error is not being migrated to the newer style
// internal/errors.js because _tls_legacy.js has been deprecated.
var err = new Error('TLS session renegotiation attack detected');
if (self.cleartext) self.cleartext.emit('error', err);
});
Expand Down

0 comments on commit d2138b2

Please sign in to comment.