From b44f245b14a5d5a38845110ea7fb61c864c12c05 Mon Sep 17 00:00:00 2001 From: xortiz Date: Tue, 19 Dec 2017 10:58:14 -0500 Subject: [PATCH] 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 Reviewed-By: Luigi Pinca Reviewed-By: James M Snell Reviewed-By: Jon Moss --- lib/_tls_legacy.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/_tls_legacy.js b/lib/_tls_legacy.js index c2bbb973cfbe31..7beec4805c1b8b 100644 --- a/lib/_tls_legacy.js +++ b/lib/_tls_legacy.js @@ -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); });