Simple-Signer
Simple-Signer copied to clipboard
Signing encrypted or write protected documents - `KeyError: 'password'`
Traceback (most recent call last):
File "/.../Simple-Signer-1.7.0/venv/lib/python3.12/site-packages/simple_signer/simple_signer.py", line 603, in DoSign
signData = cms.sign(pdfData, dct, p12Data[0], p12Data[1], p12Data[2], 'sha256')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/.../Simple-Signer-1.7.0/venv/lib/python3.12/site-packages/endesive/pdf/cms.py", line 1022, in sign
return cls.sign(
^^^^^^^^^
File "/.../Simple-Signer-1.7.0/venv/lib/python3.12/site-packages/endesive/pdf/cms.py", line 673, in sign
rc = prev.decrypt(udct["password"])
~~~~^^^^^^^^^^^^
KeyError: 'password'
When trying to sign.
openssl pkcs12 -in /home/.../keyStore.p12 -info -noout -nokeys
shows that the password is correct.
Your PDF is encrypted, right? This error is not about the cert password, but the PDF password. Signing encrypted PDFs is currently not supported.
Thanks! It's not password encrypted, but the PDF seems to have editing disabled. I also can't write text on it in Adobe.