-
-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Signature not valid, error on format or information within the signature #57
Comments
I also have this problem. |
I think that the problem is a bad generated .p12 file. Try again generating the file with openssl: openssl genrsa -out private.pem 2048
openssl req -new -sha256 -key private.pem -out csr.csr
openssl req -x509 -sha256 -days 365 -key private.pem -in csr.csr -out certificate.pem
openssl pkcs12 -export -out identity.p12 -inkey private.pem -in certificate.pem Then use the file "identity.p12" for sign the PDF. |
I believe that the problem is not the certificate, because I use a certificate generated by an official issuer and this problem still happens, and I already used this certificate and it worked, but from some moment until now this problem has been happening. |
I had a similar issue which could be solved with these changes: #61. My certificate was also generated by an official issuer which came with a root and an intermediate certificate. Unfortunately, the intermediate certificate is currently not supported by this library (which will be changed by the PR #61). This results in not trusting the signed pdf because the trust chain can only be made via the intermediate certificate. |
Hello, I've been trying to digitally sign PDFs generated with the mPDF library , I can successfully generate the PDF and sign it with the
pdfsign.php
example, but when I check the document with different programs (one of them being Adove Reader) I get a "Signature not valid, Contents illegal data". I've checked the signature itself, using a program to sign a document with it and works correctly.Not signed PDF
Example of signed PDF
Thanks in advance.
The text was updated successfully, but these errors were encountered: