mirror of
https://github.com/nodejs/node.git
synced 2025-05-03 11:12:55 +00:00
tls: use logical OR operator
Use the logical OR operator instead of the ternary operator where applicable. PR-URL: https://github.com/nodejs/node/pull/44236 Reviewed-By: theanarkh <theratliter@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Feng Yu <F3n67u@outlook.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
This commit is contained in:
parent
b04f81c149
commit
7f5679b901
@ -265,7 +265,7 @@ function configSecureContext(context, options = kEmptyObject, name = 'options')
|
||||
if (pfx !== undefined && pfx !== null) {
|
||||
if (ArrayIsArray(pfx)) {
|
||||
ArrayPrototypeForEach(pfx, (val) => {
|
||||
const raw = val.buf ? val.buf : val;
|
||||
const raw = val.buf || val;
|
||||
const pass = val.passphrase || passphrase;
|
||||
if (pass !== undefined && pass !== null) {
|
||||
context.loadPKCS12(toBuf(raw), toBuf(pass));
|
||||
|
Loading…
Reference in New Issue
Block a user