MatthiasValvekens / pyHanko

pyHanko: sign and stamp PDF files
MIT License
486 stars 71 forks source link

pyhanko.cli - ERROR - Error raised while producing signed file: The signer's certificate could not be validated. #215

Closed sayak02 closed 1 year ago

sayak02 commented 1 year ago

Describe the bug Adding custom signature to a pdf works in my local Node.js environment, but gives the "The Signer's certificate could not be validated error" in my deployed development environment in ECS.

Node.js Pyhanko Execution Command : let command = "pyhanko sign addsig --field Signature_Of_" + user.name.replace(/\s/g, "_") + " --name " + user.name.replace(/\s/g, "_") + " --reason Agreement_to_this_Document_By_" + user.name.replace(/\s/g, "_") + " --location Sama_IN --with-validation-info --validation-context special-setup --use-pades pkcs12 " + pdfPath + " " + signedpath + " file.pfx --passfil password.txt"

where

Attaching Docker File Config Screenshot for Reference: Screenshot 2023-02-06 at 11 21 39 PM

Attaching the pyhanko.yml config file Screenshot 2023-02-07 at 1 44 02 AM

Local Environment Python Version : python3 --version Python 3.8.9

Pyhanko version pyHanko, version 0.13.2

MatthiasValvekens commented 1 year ago

Hi @sayak02

Thanks for checking in. This type of validation error can be due to any number of factors. The most common culprits are the following:

Hope that helps. If not, please post a full stack trace and all pyHanko-related log events.

(I'm moving this to the discussion board as it's a support question and not a bug report.)