diff --git a/lib/internal/tls/secure-context.js b/lib/internal/tls/secure-context.js index a9bf4a1da71..3d2e4d6623e 100644 --- a/lib/internal/tls/secure-context.js +++ b/lib/internal/tls/secure-context.js @@ -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));