parsePfxPem
Decodes a PEM-armored PKCS#12/PFX container. Expects exactly one PKCS12 block.
Delegates to parsePfxDer after PEM decoding.
ts
function parsePfxPem(
pem: string,
options?: ParsePfxOptions,
): Promise<ParsePfxResult>Parameters
pem:stringoptions?:ParsePfxOptions
Examples
ts
import { parsePfxPem } from 'micro509';
const result = await parsePfxPem(pfxPemString, { password: 's3cret' });
if (result.ok) {
console.log(result.value.privateKeys.length);
}