diff --git a/src/lib/pfx.ts b/src/lib/pfx.ts index bd206fa..43e105e 100644 --- a/src/lib/pfx.ts +++ b/src/lib/pfx.ts @@ -6,7 +6,7 @@ export interface PemBundle { chainPem: string; } -export function pemToPfx(privateKeyPem: string, certPem: string, chainPem: string, password = ''): Buffer { +export function pemToPfx(privateKeyPem: string, certPem: string, chainPem: string): Buffer { const key = forge.pki.privateKeyFromPem(privateKeyPem); const cert = forge.pki.certificateFromPem(certPem); const chain = chainPem @@ -14,7 +14,7 @@ export function pemToPfx(privateKeyPem: string, certPem: string, chainPem: strin .filter(Boolean) .map(p => forge.pki.certificateFromPem(p)); - const p12 = forge.pkcs12.toPkcs12Asn1(key, [cert, ...chain], password, { algorithm: '3des' }); + const p12 = forge.pkcs12.toPkcs12Asn1(key, [cert, ...chain], null); const der = forge.asn1.toDer(p12).getBytes(); return Buffer.from(der, 'binary'); }