Skip to content

Commit

Permalink
tls: replace var with let and const
Browse files Browse the repository at this point in the history
PR-URL: #30299
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information
Nolik authored and targos committed Dec 1, 2019
1 parent ec227c9 commit a3369b2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/_tls_common.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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?
Expand Down

0 comments on commit a3369b2

Please sign in to comment.