tls: replace var with let and const

PR-URL: https://github.com/nodejs/node/pull/30299
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
Nolik authored and Myles Borins committed 2019-12-17 17:06:17 -05:00
1 parent b1415564ea
commit d59df36f58
1 file changed
+4 -4
+4 -4
View File
@@ -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?