summaryrefslogtreecommitdiff
path: root/lib/_tls_common.js
diff options
context:
space:
mode:
authorNolik <nolikfriendly@gmail.com>2019-11-06 14:37:42 +0300
committerRich Trott <rtrott@gmail.com>2019-11-08 13:58:57 -0800
commit722fc72fc29a8f19c0225532f4a2024f8377367d (patch)
tree0068414142b38b901b53555ef29f5ed3b11e05a6 /lib/_tls_common.js
parentaf544abf2c3ec3f0ee3b4ef1b1f45ffa49291d2e (diff)
downloadandroid-node-v8-722fc72fc29a8f19c0225532f4a2024f8377367d.tar.gz
android-node-v8-722fc72fc29a8f19c0225532f4a2024f8377367d.tar.bz2
android-node-v8-722fc72fc29a8f19c0225532f4a2024f8377367d.zip
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>
Diffstat (limited to 'lib/_tls_common.js')
-rw-r--r--lib/_tls_common.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/_tls_common.js b/lib/_tls_common.js
index ef67d23ac8..981503e6e9 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?