We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Digital signature invalid in Acrobat Reader - Error encountered while BER decoding

Hello,

when I open a digital signed PDF document with Acrobat Reader it displays "invalid signature". If I click on the signature area in the document, a popup with error message "Error encountered while BER decoding" appears.

I used following code to sign the document:

var certStream = assembly.GetManifestResourceStream("XamSyncfusion.Assets.test.pfx");

//Creates a certificate instance from PFX file with private key.

PdfCertificate pdfCert = new PdfCertificate(certStream, "1234");

//Creates a digital signature.

PdfSignature signature = new PdfSignature(document, page, pdfCert, "Signature");

signature.Bounds = new RectangleF(new PointF(0, 0), new SizeF(100, 100));

signature.ContactInfo = "johndoe@owned.us";

signature.LocationInfo = "Honolulu, Hawaii";

signature.Reason = "I am author of this document.";


The certificate was created using openSSL. When I sign a PDF in Acrobat Reader using the same certificate, the signature shows as valid.


Can you help?


Thanks

Hanns Schwarz


5 Replies

SP Sathya Ponnusamy Syncfusion Team October 13, 2017 12:58 PM

Hi Hanns Schwarz, 

Thanks for the update. 

We have prepared the sample using “PDF.pfx”. But we were unable to reproduce the reported behavior. It seems to be working fine with prepared sample. We suspect that the reported behavior is occurred with the pfx which you have used. Please share the pfx file, so that It will be more helpful to resolve this issue as earliest.  
  
Please find the sample from the below link. 
  
Regards,
Sathya Ponnusamy 



SC Schwarz October 16, 2017 01:02 AM

I have the same behavior with your sample. It works with your pfx certificate but not with ours. Please find attached our pfx file.


Attachment: test_d030d9c3.zip


SP Sathya Ponnusamy Syncfusion Team October 17, 2017 03:50 AM

  
Hi Hanns Schwarz,  
 
We have been checked with “text.pfx” with password  “1234” mentioned in your previous update but it throws “Password is not correct exception”. So could you please provide valid password for “test.pfx”, it will be more helpful to proceed further on this.  
 
Please find below screenshot for password wrong exception. 
 
 

Regards, 
Sathya Ponnusamy 



SC Schwarz October 17, 2017 06:04 AM

The certificate is not Password protected. Just leave the field empty.



CM Chinnu Muniyappan Syncfusion Team October 18, 2017 04:39 AM

Hi Schwarz, 
 
Thank you for your update. 
 
We are able to reproduce the reported issue in our side and have logged defect report regarding this. A support incident to track the status of this defect has been created under your account. Please log on to our support website to check for further updates. 
 
Regards, 
Chinnu 


Loader.
Live Chat Icon For mobile
Up arrow icon