Are chain certificates supported?
Heho I try to use opensign. Ref: https://github.com/OpenSignLabs/OpenSign/discussions/1376 If I use a pkcs12 certificate with ca chain I get the following message, but with certificates without chain it works. Could it be that chain certificates are not supported by this library?
Greetings Cy
server-1 | new entry is insert in contracts_Document
server-1 | Err in signpdf TypeError: Cannot destructure property 'publicKey' of 'certBags[i].cert' as it is null.
server-1 | at /usr/src/app/node_modules/@signpdf/signer-p12/dist/P12Signer.js:66:9
server-1 | at Array.forEach (<anonymous>)
server-1 | at P12Signer.sign (/usr/src/app/node_modules/@signpdf/signer-p12/dist/P12Signer.js:64:27)
server-1 | at SignPdf.sign (/usr/src/app/node_modules/@signpdf/signpdf/dist/signpdf.js:72:30)
server-1 | at PDF (file:///usr/src/app/cloud/parsefunction/pdf/PDF.js:405:38)
Hi , I have the same issue, p12 with chain CA certificates inside, and the signature result is Invalid. Maybe vbuch tested all this project with self-signed p12? Also made this issue https://github.com/vbuch/node-signpdf/issues/290 but no answer yet.
When this package was started (years ago) my initial use-case was with a chain. So just based on that I would assume we've somehow managed it. Can't remember any detail atm, but just in theory it should.