Skip to content

Commit a3369b2

Browse files
Noliktargos
Nolik
authored andcommitted
tls: replace var with let and const
PR-URL: #30299 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent ec227c9 commit a3369b2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/_tls_common.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,14 @@ exports.SecureContext = SecureContext;
9191
exports.createSecureContext = function createSecureContext(options) {
9292
if (!options) options = {};
9393

94-
var secureOptions = options.secureOptions;
94+
let secureOptions = options.secureOptions;
9595
if (options.honorCipherOrder)
9696
secureOptions |= SSL_OP_CIPHER_SERVER_PREFERENCE;
9797

9898
const c = new SecureContext(options.secureProtocol, secureOptions,
9999
options.minVersion, options.maxVersion);
100-
var i;
101-
var val;
100+
let i;
101+
let val;
102102

103103
// Add CA before the cert to be able to load cert's issuer in C++ code.
104104
const { ca } = options;
@@ -313,7 +313,7 @@ exports.translatePeerCertificate = function translatePeerCertificate(c) {
313313
}
314314
if (c.subject != null) c.subject = parseCertString(c.subject);
315315
if (c.infoAccess != null) {
316-
var info = c.infoAccess;
316+
const info = c.infoAccess;
317317
c.infoAccess = Object.create(null);
318318

319319
// XXX: More key validation?

0 commit comments

Comments
 (0)