diff --git a/lib/_tls_common.js b/lib/_tls_common.js index b669badb701..fb6ac34d1e6 100644 --- a/lib/_tls_common.js +++ b/lib/_tls_common.js @@ -88,7 +88,7 @@ exports.createSecureContext = function createSecureContext(options, context) { if (options.honorCipherOrder) secureOptions |= SSL_OP_CIPHER_SERVER_PREFERENCE; - var c = new SecureContext(options.secureProtocol, secureOptions, context); + const c = new SecureContext(options.secureProtocol, secureOptions, context); var i; var val; @@ -96,7 +96,7 @@ exports.createSecureContext = function createSecureContext(options, context) { // NOTE: It's important to add CA before the cert to be able to load // cert's issuer in C++ code. - var ca = options.ca; + const { ca } = options; if (ca) { if (Array.isArray(ca)) { for (i = 0; i < ca.length; ++i) { @@ -112,7 +112,7 @@ exports.createSecureContext = function createSecureContext(options, context) { c.context.addRootCerts(); } - var cert = options.cert; + const { cert } = options; if (cert) { if (Array.isArray(cert)) { for (i = 0; i < cert.length; ++i) {