[
https://issues.apache.org/jira/browse/PDFBOX-4662?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tilman Hausherr resolved PDFBOX-4662.
-------------------------------------
Resolution: Fixed
> ClassCastException: org.bouncycastle.asn1.DLTaggedObject cannot be cast to
> org.bouncycastle.asn1.DERTaggedObject
> ----------------------------------------------------------------------------------------------------------------
>
> Key: PDFBOX-4662
> URL: https://issues.apache.org/jira/browse/PDFBOX-4662
> Project: PDFBox
> Issue Type: Bug
> Components: Crypto
> Affects Versions: 2.0.17
> Reporter: Tilman Hausherr
> Assignee: Tilman Hausherr
> Priority: Major
> Fix For: 2.0.18, 3.0.0 PDFBox
>
> Attachments: QV_RCA1_RCA3_CPCPS_V4_11.pdf
>
>
> I get this with the attached file:
> {noformat}
> Exception in thread "main" java.lang.ClassCastException:
> org.bouncycastle.asn1.DLTaggedObject cannot be cast to
> org.bouncycastle.asn1.DERTaggedObject
> at
> org.apache.pdfbox.examples.signature.cert.CertificateVerifier.extractOCSPURL(CertificateVerifier.java:397)
> at
> org.apache.pdfbox.examples.signature.cert.CertificateVerifier.checkRevocations(CertificateVerifier.java:197)
> at
> org.apache.pdfbox.examples.signature.cert.CertificateVerifier.verifyCertificate(CertificateVerifier.java:151)
> at
> org.apache.pdfbox.examples.signature.ShowSignature.verifyCertificateChain(ShowSignature.java:901)
> {noformat}
> Solution: replace DERTaggedObject with ASN1TaggedObject. The exception is
> related to a change in BC. The latest 2.0 branch doesn't have the problem,
> but it uses 1.60 while the trunk uses 1.63. The error doesn't happen with
> 1.62. The changes doesn't break the 2.0 branch so I'll change it there too,
> to avoid trouble for people who use 1.63 with the code. My impression of
> looking at the source code is that the difference between the two classes is
> in encoding, which we don't use.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]