Copy link to clipboard
Copied
Hi Adobe,
We are using adbe.pkcs7.detached adding signature to the PDF. whenever I open signed PDF form it will show signature is unknown with below error code as
Error during signature verification.
Signature contains incorrect, unrecognized, corrupted or suspicious data.
Support Information: SigDict /Contents illegal data
Can anyone confirm me issue w.r.t to the signature verification.
With regards
Ravi
Copy link to clipboard
Copied
Unfortunately I don't do any rust development and cannot recommend any libraries there, I'm more into Java and C#.
As far as documentation is concerned, the lopdf entry links to where you can receive the PDF 2.0 specification ISO 32000-2 for free.
Copy link to clipboard
Copied
Hello @MikelKlink ,
I'm having a similar problem, trying to do multiple signatures in my test environment. What could be the issue and possible fix?
Thanks!
Copy link to clipboard
Copied
I'm having a similar problem, trying to do multiple signatures in my test environment. What could be the issue and possible fix?
In your example file the initial revision (containing the first signature) has been re-saved after signing (not applying changes in an incremental update but completely re-writing the PDF). This not only changed the signed byte range contents but also moved the signature dictionary (rendering the ByteRange entry itself incorrect) and changed the size of the single-revision PDF (making the ByteRange not covering a whole revision anymore). Furthermore, the software doing this re-write has an error in its cross reference table writing code.
Thus, the first signature in your document must be reported as broken.
After that first revision with the broken first signature there are a number of additional revisions (saved using incremental updates) to apply a second signature:
At first glance these steps look ok.
So you should check which code in your setup broke the initial PDF and fix that.
Copy link to clipboard
Copied
Hello @MikelKlink
Could you please help me as well in identifying the issues with signature validity?
I am trying to sign the PDF using the Apache PDFBox library using a Class-2/3 cert. But, when I open the PDF in Acrobat Reader, I see a bunch of validation failures.. Attaching the sample pdf for reference.. Thanks.
Copy link to clipboard
Copied
But, when I open the PDF in Acrobat Reader, I see a bunch of validation failures.. Attaching the sample pdf for reference.
Which bunch of validation failures? I only see one:
Looking into it, though, a number of issues become obvious:
The first item indicates that the PDF has only been prepared for signing but no signature container has actually been embedded. The latter items indicate that after preparing for signing the PDF has again been opened and then saved regularly and not as a new revision by appending an incremental update.
The PDFBox example signing code does neither of these errors. Thus, please have a look at the PDFBox examples and do as they do.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
password; RSAI2015
EAadhaar_2726511120312820241001164100_0201202511345.pdf
By @duraimobiles_9170
The file you shared is not a valid PDF file. It is the concatenation of two PDF files, the first 1390126 bytes are the first PDF (attached here as EAadhaar_2726511120312820241001164100_0201202511345-001.pdf) and the remaining 1410701 bytes are the second PDF (attached here as EAadhaar_2726511120312820241001164100_0201202511345-002.pdf). Actually the second PDF is a copy of the first with a signature attached.
If you open the second PDF in Acrobat, you'll see that it accepts the signature (if you happen to have configured it to trust the "DS Unique Identification Authority of India 05" signer certificate or one of its chain of issuer certificates).
Concatenating two valid PDFs does not create a valid new PDF. So when loading your full file, Acrobat has to repair it. But repairing a PDF usually results in a file that is internally considerably different from the original file. Thus, Acrobat will display the signature as invalid.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now