summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxortiz <xavier.ortiz.ch@gmail.com>2017-12-19 10:58:14 -0500
committerMyles Borins <mylesborins@google.com>2018-02-12 19:28:23 -0500
commita08925dcbd505804dfca07bca1af9bc57a556754 (patch)
treea09eb2f1828a7ca6e418430a75d2850355782c44
parent1553c7326c59ba7abbe22dc8b512a98cf236eb40 (diff)
downloadnode-new-a08925dcbd505804dfca07bca1af9bc57a556754.tar.gz
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: https://github.com/nodejs/node/pull/17759 Refs: https://github.com/nodejs/node/issues/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>
-rw-r--r--lib/_tls_legacy.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/_tls_legacy.js b/lib/_tls_legacy.js
index 87ccb081ee..363589f053 100644
--- a/lib/_tls_legacy.js
+++ b/lib/_tls_legacy.js
@@ -608,6 +608,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);
});