ICEpdf
  1. ICEpdf
  2. PDF-1132

CertPathBuilderException: No certificate found matching targetContraints

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 6.2.2
    • Fix Version/s: 6.2.3, 6.3
    • Component/s: Core/Rendering, Forms
    • Labels:
      None
    • Environment:
      All

      Description

      When rendering the provided PDF file, the following exception is thrown, causing the PDF to render blank:

      FINEST: Certificate chain could not be validated.
      org.icepdf.core.pobjects.acroform.signature.exceptions.CertificateVerificationException: Error building certification path: CN=Stadt Zürich, OU=Third Party Services (Art. 9 ElDI-V), OU=Scanning Center Steueramt, O=Stadt Zürich, L=Zürich, ST=ZH, C=CH
      at org.icepdf.core.pobjects.acroform.signature.certificates.CertificateVerifier.verifyCertificate(CertificateVerifier.java:98)
      at org.icepdf.core.pobjects.acroform.signature.AbstractPkcsValidator.validateDocument(AbstractPkcsValidator.java:634)
      at org.icepdf.core.pobjects.acroform.signature.Pkcs7Validator.validate(Pkcs7Validator.java:69)
      at org.icepdf.ri.common.utility.signatures.SignatureTreeNode.validateSignatureNode(SignatureTreeNode.java:116)
      at org.icepdf.ri.common.utility.signatures.SignatureTreeNode.<init>(SignatureTreeNode.java:73)
      at org.icepdf.ri.common.utility.signatures.SignaturesPanel.addSignature(SignaturesPanel.java:167)
      at org.icepdf.ri.common.utility.signatures.SigVerificationTask$VerifyAllSignatures$1.run(SigVerificationTask.java:213)
      at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:312)
      at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
      at java.awt.EventQueue.access$200(EventQueue.java:103)
      at java.awt.EventQueue$3.run(EventQueue.java:694)
      at java.awt.EventQueue$3.run(EventQueue.java:692)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
      Caused by: java.security.cert.CertPathBuilderException: No certificate found matching targetContraints.
      at org.bouncycastle.jce.provider.PKIXCertPathBuilderSpi.engineBuild(Unknown Source)
      at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:268)
      at org.icepdf.core.pobjects.acroform.signature.certificates.CertificateVerifier.verifyCertificate(CertificateVerifier.java:171)
      at org.icepdf.core.pobjects.acroform.signature.certificates.CertificateVerifier.verifyCertificate(CertificateVerifier.java:83)
      ... 20 more

        Activity

        Hide
        Patrick Corless added a comment -

        The security exception is expected at the finest logging level as the cert in question can not be found in the JVM's keystore. The rendering issue is actually coming from the application of the an overlay blending mode. The blending mode is added to the drawing stack first and thus there is no primary or src colour yet defined. Or overlay algorithm works fine in other instances so I have to assume it's placement in the stack is the reason for the missing missing content.

        Show
        Patrick Corless added a comment - The security exception is expected at the finest logging level as the cert in question can not be found in the JVM's keystore. The rendering issue is actually coming from the application of the an overlay blending mode. The blending mode is added to the drawing stack first and thus there is no primary or src colour yet defined. Or overlay algorithm works fine in other instances so I have to assume it's placement in the stack is the reason for the missing missing content.
        Hide
        Patrick Corless added a comment -

        Added fix to trunk and 6.2 branch.

        Show
        Patrick Corless added a comment - Added fix to trunk and 6.2 branch.

          People

          • Assignee:
            Patrick Corless
            Reporter:
            Arran Mccullough
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: