From c9fdd56df39ce6a97c321e88fcc2611364c61c54 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. Refs:https://github.com/nodejs/node/issues/17709#issuecomment-352790454 --- lib/_tls_legacy.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/_tls_legacy.js b/lib/_tls_legacy.js index d65da58e8cf2e9..7a3c0edfb9bc6d 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 depreciated. var err = new Error('TLS session renegotiation attack detected'); if (self.cleartext) self.cleartext.emit('error', err); });