Closed sibutorovic closed 7 months ago
Solved. For anyone with the same issue you need to pass the passphrase in the signer constructor instead of the sign method like this:
var signer = new P12Signer.P12Signer(certificateBuffer, { passphrase: 'correct_pass' });
Describe the bug and the expected behaviour signer.sign is returning PKCS#12 MAC could not be verified. Invalid password? error when trying to sign with the correct passphrase
Is it a bug in signing or in the helpers? Signing
To Reproduce Below is the code that generates this error. Used the same code to sign a PDF with a passphrase-less certificate and had no problem but when switching to a certificate with passphrase it starts to fail. Important: the certificate i am using is expired, I don't know if that is relevant.