# CertPathChecker

public interface **CertPathChecker**

|---|---|---|
| Known Indirect Subclasses [PKIXCertPathChecker](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/cert/PKIXCertPathChecker.html), [PKIXRevocationChecker](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/cert/PKIXRevocationChecker.html) |---|---| | [PKIXCertPathChecker](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/cert/PKIXCertPathChecker.html) | An abstract class that performs one or more checks on an `X509Certificate`. | | [PKIXRevocationChecker](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/cert/PKIXRevocationChecker.html) | A `PKIXCertPathChecker` for checking the revocation status of certificates with the PKIX algorithm. | |||

<br />

Performs one or more checks on each `Certificate` of a
`CertPath`.

A `CertPathChecker` implementation is typically created to extend
a certification path validation algorithm. For example, an implementation
may check for and process a critical private extension of each certificate
in a certification path.

### Public Method Summary

|---|---|
| abstract void | [check](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/cert/CertPathChecker.html#check(java.security.cert.Certificate))([Certificate](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/cert/Certificate.html) cert) Performs the check(s) on the specified certificate using its internal state. |
| abstract void | [init](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/cert/CertPathChecker.html#init(boolean))(boolean forward) Initializes the internal state of this `CertPathChecker`. |
| abstract boolean | [isForwardCheckingSupported](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/cert/CertPathChecker.html#isForwardCheckingSupported())() Indicates if forward checking is supported. |

## Public Methods

#### public abstract void
**check**
([Certificate](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/cert/Certificate.html) cert)

Performs the check(s) on the specified certificate using its internal
state. The certificates are presented in the order specified by the
`init` method.

##### Parameters

| cert | the `Certificate` to be checked |
|---|---|

##### Throws

| [CertPathValidatorException](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/cert/CertPathValidatorException.html) | if the specified certificate does not pass the check |
|---|---|

#### public abstract void
**init**
(boolean forward)

Initializes the internal state of this `CertPathChecker`.

The `forward` flag specifies the order that certificates will
be passed to the `https://developers.google.com/j2objc/javadoc/jre/reference/java/security/cert/CertPathChecker.html#check(java.security.cert.Certificate)` method (forward or reverse).

##### Parameters

| forward | the order that certificates are presented to the `check` method. If `true`, certificates are presented from target to trust anchor (forward); if `false`, from trust anchor to target (reverse). |
|---|---|

##### Throws

| [CertPathValidatorException](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/cert/CertPathValidatorException.html) | if this `CertPathChecker` is unable to check certificates in the specified order |
|---|---|

#### public abstract boolean
**isForwardCheckingSupported**
()

Indicates if forward checking is supported. Forward checking refers
to the ability of the `CertPathChecker` to perform its checks
when certificates are presented to the `check` method in the
forward direction (from target to trust anchor).

##### Returns

- `true` if forward checking is supported, `false` otherwise