org.apache.synapse.transport.certificatevalidation.pathvalidation

## Class PathChecker

- java.lang.Object
- - java.security.cert.PKIXCertPathChecker
  - - org.apache.synapse.transport.certificatevalidation.pathvalidation.PathChecker

- All Implemented Interfaces:
    java.lang.Cloneable, java.security.cert.CertPathChecker

      public class PathChecker
      extends java.security.cert.PKIXCertPathChecker

  This class is used by CertificatePathValidator to check revocation status of the certificate chain. Certificates in the chain will be passed to the check(..,..) method one by one. This is not Thread safe since the process is state full. Should not be shared among threads.

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `PathChecker(java.security.cert.X509Certificate[] certChainArray, RevocationVerifier verifier)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `check(java.security.cert.Certificate cert, java.util.Collection<java.lang.String> unresolvedCritExts)` Used by CertPathValidator to pass the certificates one by one from the certificate chain.
    `java.util.Set<java.lang.String>` | `getSupportedExtensions()`
    `void` | `init(boolean forward)`
    `boolean` | `isForwardCheckingSupported()` Forward checking is not supported.

    - ### Methods inherited from class java.security.cert.PKIXCertPathChecker

      `check, clone`

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PathChecker

          protected PathChecker(java.security.cert.X509Certificate[] certChainArray,
                                RevocationVerifier verifier)

  - ### Method Detail

    - #### init

          public void init(boolean forward)
                    throws java.security.cert.CertPathValidatorException

      Specified by:
        `init` in interface `java.security.cert.CertPathChecker`
      Specified by:
        `init` in class `java.security.cert.PKIXCertPathChecker`
      Throws:
        `java.security.cert.CertPathValidatorException`

    - #### isForwardCheckingSupported

          public boolean isForwardCheckingSupported()

      Forward checking is not supported. Certificates should be passed from the most trusted CA certificate to the target certificate. This is the default implementation of the Path validator used CertPathValidator.getInstance("PKIX", "BC") in CertificatePathValidator;
      Specified by:
        `isForwardCheckingSupported` in interface `java.security.cert.CertPathChecker`
      Specified by:
        `isForwardCheckingSupported` in class `java.security.cert.PKIXCertPathChecker`

    - #### getSupportedExtensions

          public java.util.Set<java.lang.String> getSupportedExtensions()

      Specified by:
        `getSupportedExtensions` in class `java.security.cert.PKIXCertPathChecker`

    - #### check

          public void check(java.security.cert.Certificate cert,
                            java.util.Collection<java.lang.String> unresolvedCritExts)
                     throws java.security.cert.CertPathValidatorException

      Used by CertPathValidator to pass the certificates one by one from the certificate chain.
      Specified by:
        `check` in class `java.security.cert.PKIXCertPathChecker`
      Parameters:
        `cert` - the certificate passed to be checked.
        `unresolvedCritExts` - not used in this method.
      Throws:
        `java.security.cert.CertPathValidatorException`

Copyright © 2005-2020 Apache Software Foundation. All Rights Reserved.