From d2138b205ce78ab1f2bec9f0e2b5ad4d2f8e4748 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 07b95546b3307a..c59153b758d772 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); });