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 <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Jon Moss <[email protected]>
  • Loading branch information
Xavier-J-Ortiz authored and MylesBorins committed Jan 9, 2018
1 parent 112b655 commit b44f245
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 b44f245

Please sign in to comment.