I'm trying to generate a pkcs12 in order to sign pdf files.
I have a X509 certificate (certificateString) but can't get a pkcs12 from there.
Could you help ?
const cert = forge.pki.certificateFromPem(certificateString);
const asn1Cert = forge.pki.certificateToAsn1(cert);
// The following line produces an error -> Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX.
const p12 = forge.pkcs12.pkcs12FromAsn1(asn1Cert);
I'm trying to generate a pkcs12 in order to sign pdf files. I have a X509 certificate (certificateString) but can't get a pkcs12 from there.
Could you help ?