node-signpdf icon indicating copy to clipboard operation
node-signpdf copied to clipboard

Got Error when updated node-forge package to version 1.3.2

Open rjcodedev opened this issue 1 month ago • 5 comments

Describe the bug and the expected behaviour When I have updated package to node-forge i have got the error
Invalid`` PKCS#12. macData field present but MAC was not validated.

Is it a bug in signing or in the helpers?

Image

To Reproduce update the package called node-forge to 1.3.2.

rjcodedev avatar Nov 27 '25 14:11 rjcodedev

Interesting. I just merged the bump of the version today. No test failed with the new version. https://github.com/vbuch/node-signpdf/pull/297

vbuch avatar Nov 27 '25 16:11 vbuch

here are some code snippet which are working perfectly with node-forge 1.3.1

//imports
import { SignPdf } from '@signpdf/signpdf';
import { P12Signer } from '@signpdf/signer-p12';

// buffer of pdf and p12
let PdfBuffer = Buffer.from(req.params.pdfFile, 'base64');
const P12Buffer = Buffer.from(pfxFile, 'base64');

// p12 certificate with it pass phrase
const p12Cert = new P12Signer(P12Buffer, { passphrase: passphrase || null });

// Also i have add placeholder using package '@signpdf/placeholder-pdf-lib' before signing

// Digitally signed pdf
const OBJ = new SignPdf();
const signedpdf = await OBJ.sign(PdfBuffer, p12Cert);


if there any thing you need, please tell me. I am happy to help you @vbuch

rjcodedev avatar Nov 28 '25 08:11 rjcodedev

hey @vbuch ,

any update on the issue?

rjcodedev avatar Dec 02 '25 11:12 rjcodedev

@rjcodedev could you check with 1.3.3? https://github.com/digitalbazaar/forge/blob/main/CHANGELOG.md#133---2025-12-02 https://github.com/digitalbazaar/forge/issues/1127

vbuch avatar Dec 05 '25 08:12 vbuch

hey @vbuch ,

The issue has been resolved after updating node-forge package to 1.3.3.

rjcodedev avatar Dec 08 '25 06:12 rjcodedev

Hey @vbuch,

have you published the latest changes to NPM?

rjcodedev avatar Dec 16 '25 05:12 rjcodedev

@rjcodedev https://github.com/vbuch/node-signpdf/compare/master...develop these things are not yet in npm. So the broken 1.3.2 is not there yet as well.

vbuch avatar Dec 16 '25 07:12 vbuch

When you are planning to release new changes?

rjcodedev avatar Dec 22 '25 05:12 rjcodedev