schorschii / Simple-Signer

Sign and certify PDF files on Linux with optional visual stamp using a .p12/.pfx certificate file
GNU General Public License v3.0
43 stars 8 forks source link

Cannot sign with P256 self-signed key #10

Closed brozkeff closed 7 months ago

brozkeff commented 11 months ago

I generated a nist p256 key and self signed certificate using openssl, however I cannot use it in simple signer due to error at the last step:

<class 'TypeError'>: _EllipticCurvePrivateKey.sign() takes 3 positional arguments but 4 were given

Using python 3.10, Linux Mint 21 based on Ubuntu 22.04

The same certificate can be used in Thunderbird or Firefox NSS and then used in LibreOffice to sign ODT or PDF exported from Libreoffice.

When I created a certificate based on RSA2048 using Actalis it is able to perform the signing without error.

schorschii commented 8 months ago

This issue needs to be fixed in the endesive library. I created a pull request m32/endesive#158.

schorschii commented 7 months ago

The PR is merged into endesive and I released a new Simple Signer version. I'd appreciate your feedback.

schorschii commented 7 months ago

Please note that other programs such as Okular also have problems verifying EC key signatures. But Adobe Acrobat Reader for example can verify EC signatures.