Unable to verifySignature

aspose-pdf-kit-4.3.0.jaraspose-pdf-kit-4.3.0.jar

PdfFileSignature pdfSign = new PdfFileSignature(args[0]);

pdfSign.verifySignature(signName);

ExceptionConverter: java.security.cert.CertificateException: Unable to initialize, java.io.IOException: DerInputStream.getLength(): lengthTag=127, too
big.
at sun.security.x509.X509CertImpl.(X509CertImpl.java:199)
at sun.security.provider.X509Factory.parseX509orPKCS7Cert(X509Factory.java:429)
at sun.security.provider.X509Factory.engineGenerateCertificates(X509Factory.java:335)
at java.security.cert.CertificateFactory.generateCertificates(CertificateFactory.java:462)
at com.aspose.pdf.kit.oc.a(Unknown Source)
at com.aspose.pdf.kit.oc.(Unknown Source)
at com.aspose.pdf.kit.ob.(Unknown Source)
at com.aspose.pdf.kit.h.e(Unknown Source)
at com.aspose.pdf.kit.h.n(Unknown Source)
at com.aspose.pdf.kit.PdfFileSignature.verifySigned(Unknown Source)
at com.aspose.pdf.kit.PdfFileSignature.verifySignature(Unknown Source)
at SignTest.main(SignTest.java:26)
Caused by: java.io.IOException: DerInputStream.getLength(): lengthTag=127, too big.
at sun.security.util.DerInputStream.getLength(DerInputStream.java:561)
at sun.security.util.DerValue.(DerValue.java:252)
at sun.security.util.DerInputStream.getDerValue(DerInputStream.java:417)
at sun.security.x509.X509CertImpl.parse(X509CertImpl.java:1727)
at sun.security.x509.X509CertImpl.(X509CertImpl.java:196)
… 11 morev

The same signed PDF can be verified with Acrobat Reader fine, except the signing certificate is not trusted.

Hi,


Thanks for using our products.

I
have tested the scenario and I am able to reproduce the same problem. For the
sake of correction, I have logged it in our issue tracking system as
PDFKITJAVA-33227. We
will investigate this issue in details and will keep you updated on the status
of a correction.

We
apologize for your inconvenience.

Thanks.

When would we expect an update?

<span style=“font-size:11.0pt;font-family:“Calibri”,“sans-serif”;
mso-ascii-theme-font:minor-latin;mso-fareast-font-family:Calibri;mso-fareast-theme-font:
minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:“Times New Roman”;
mso-bidi-theme-font:minor-bidi;mso-ansi-language:EN-US;mso-fareast-language:
EN-US;mso-bidi-language:AR-SA”>Hi,

<span style=“font-size:11.0pt;font-family:“Calibri”,“sans-serif”;
mso-ascii-theme-font:minor-latin;mso-fareast-font-family:Calibri;mso-fareast-theme-font:
minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:“Times New Roman”;
mso-bidi-theme-font:minor-bidi;mso-ansi-language:EN-US;mso-fareast-language:
EN-US;mso-bidi-language:AR-SA”>
<span style=“font-size:11.0pt;font-family:“Calibri”,“sans-serif”;
mso-ascii-theme-font:minor-latin;mso-fareast-font-family:Calibri;mso-fareast-theme-font:
minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:“Times New Roman”;
mso-bidi-theme-font:minor-bidi;mso-ansi-language:EN-US;mso-fareast-language:
EN-US;mso-bidi-language:AR-SA”>Please note that as we just have been able to notice this issue, so the development team requires little time to investigate and figure out the actual reasons of this problem. Nevertheless, as soon as we have made some progress, we would be more than happy to update you with the status of correction. Once again, my humble request is to please be patient and spare us little time. We are sorry for your inconvenience.