From a3369b2fe27407f4f29b41ae67440740ba9d3c85 Mon Sep 17 00:00:00 2001 From: Nolik Date: Wed, 6 Nov 2019 14:37:42 +0300 Subject: [PATCH] tls: replace var with let and const PR-URL: https://github.com/nodejs/node/pull/30299 Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig --- lib/_tls_common.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/_tls_common.js b/lib/_tls_common.js index ef67d23ac85f3f..981503e6e96658 100644 --- a/lib/_tls_common.js +++ b/lib/_tls_common.js @@ -91,14 +91,14 @@ exports.SecureContext = SecureContext; exports.createSecureContext = function createSecureContext(options) { if (!options) options = {}; - var secureOptions = options.secureOptions; + let secureOptions = options.secureOptions; if (options.honorCipherOrder) secureOptions |= SSL_OP_CIPHER_SERVER_PREFERENCE; const c = new SecureContext(options.secureProtocol, secureOptions, options.minVersion, options.maxVersion); - var i; - var val; + let i; + let val; // Add CA before the cert to be able to load cert's issuer in C++ code. const { ca } = options; @@ -313,7 +313,7 @@ exports.translatePeerCertificate = function translatePeerCertificate(c) { } if (c.subject != null) c.subject = parseCertString(c.subject); if (c.infoAccess != null) { - var info = c.infoAccess; + const info = c.infoAccess; c.infoAccess = Object.create(null); // XXX: More key validation?