Skip to content

Signing encrypted or write protected documents - KeyError: 'password' #37

Description

@mosuem
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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    looking for fundingFund the development of this feature or make a pull request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions