lib: make c, ca and certs const in _tls_common
PR-URL: https://github.com/nodejs/node/pull/20073 Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
72d15866ac
commit
188ed074a9
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user