Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Methods](https://developer.android.com/reference/java/security/cert/CertPathChecker#pubmethods)

# CertPathChecker

` public interface CertPathChecker `   
` `

|---|
| java.security.cert.CertPathChecker |

Known indirect subclasses [PKIXCertPathChecker](https://developer.android.com/reference/java/security/cert/PKIXCertPathChecker), [PKIXRevocationChecker](https://developer.android.com/reference/java/security/cert/PKIXRevocationChecker) [PKIXCertPathChecker](https://developer.android.com/reference/java/security/cert/PKIXCertPathChecker) An abstract class that performs one or more checks on an `X509Certificate`. [PKIXRevocationChecker](https://developer.android.com/reference/java/security/cert/PKIXRevocationChecker) 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.

## Summary

| ### Public methods ||
|---|---|
| ` abstract void` | ` https://developer.android.com/reference/java/security/cert/CertPathChecker#check(java.security.cert.Certificate)(https://developer.android.com/reference/java/security/cert/Certificate cert) ` Performs the check(s) on the specified certificate using its internal state. |
| ` abstract void` | ` https://developer.android.com/reference/java/security/cert/CertPathChecker#init(boolean)(boolean forward) ` Initializes the internal state of this `CertPathChecker`. |
| ` abstract boolean` | ` https://developer.android.com/reference/java/security/cert/CertPathChecker#isForwardCheckingSupported()() ` Indicates if forward checking is supported. |

## Public methods

### check

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract void check (Certificate 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.

<br />

| Parameters ||
|---|---|
| `cert` | `Certificate`: the `Certificate` to be checked <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/security/cert/CertPathValidatorException` | if the specified certificate does not pass the check |

### init

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
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://developer.android.com/reference/java/security/cert/CertPathChecker#check(java.security.cert.Certificate)` method (forward or reverse).

<br />

| Parameters ||
|---|---|
| `forward` | `boolean`: 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). <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/security/cert/CertPathValidatorException` | if this `CertPathChecker` is unable to check certificates in the specified order |

### isForwardCheckingSupported

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
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).

<br />

| Returns ||
|---|---|
| `boolean` | `true` if forward checking is supported, `false` otherwise <br /> |