Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Wed Sep 08, 2021 7:11 am

Hello,
We just noticed a problem with verifying PDF digital signatures applied by SpirePdf library. Adobe Acrobat Reader for one of attached file show certificate is OK (on my local machine – developer PFX)
good_signature_verif.png

but for second show that annotation was deleted and file has been changed and destroy signature.
bad_signature_verif.png

Validation done by SpirePdf – return success for each files.

What is the reason of this strange behavior?
Can we make some changes in Bad4Sign.pdf with SpirePdf to get positive validation?

Best Regards
Dariusz Arendarski
P.S. Example solution and test files (source and result pdfs) attached.

d.arendarski
 
Posts: 10
Joined: Mon Dec 07, 2020 10:13 am

Wed Sep 08, 2021 10:11 am

Hello,

Thanks for your inquiry.
I did observe that the verification result of the digital signature in "sig_Bad4Sign.pdf" using our Spire.PDF is inconsistent with using Adobe. I have logged this issue in our bug tracking system with the ticket SPIREPDF-4630. If there is any update, we will let you know.

Besides, if you apply a valid license in your project, after adding a digital signature to file "Bad4Sign.pdf", the signature of the result file will be valid when opened in Adobe.

Sincerely,
Brian
E-iceblue support team
User avatar

Brian.Li
 
Posts: 1271
Joined: Mon Oct 19, 2020 3:04 am

Wed Sep 08, 2021 11:08 am

Hello
Do You mean apply Spire.Pdf licence ? We use licenced version (I have just check with version 7.9.2) and problem still occurred.
Could You send few .net lines how to make this file signed with success validation in Adobe Reader?

Best regards
Dariusz Arendarski

d.arendarski
 
Posts: 10
Joined: Mon Dec 07, 2020 10:13 am

Thu Sep 09, 2021 3:57 am

Hello,

Thanks for your response.
I noticed that there was a warning message in the result PDF file you provided, which indicates that you did not apply a valid license when testing. I verified that when a valid license is applied to your project, the signatures added to the PDF file are all valid. Please add the line below to the top of the main method and test again.

Code: Select all
//The parameter key is the value of the Key attribute of the element License of your license xml file
Spire.License.LicenseProvider.SetLicenseKey("your key");


Sincerely,
Brian
E-iceblue support team
User avatar

Brian.Li
 
Posts: 1271
Joined: Mon Oct 19, 2020 3:04 am

Thu Sep 09, 2021 6:15 am

Hello,
Ok, I have known it, for this test solution it doesn't mater.
The problem is digital certificate verification. So I waiting for BUG investigation result.

Best regards
Dariusz Arendarski

d.arendarski
 
Posts: 10
Joined: Mon Dec 07, 2020 10:13 am

Thu Sep 09, 2021 8:28 am

Okay, we will keep you informed if there is any update. Apologize for the inconvenience caused.

Sincerely,
Brian
E-iceblue support team
User avatar

Brian.Li
 
Posts: 1271
Joined: Mon Oct 19, 2020 3:04 am

Return to Spire.PDF

cron