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

# java.security.cert

Provides classes and interfaces for parsing and managing certificates, certificate revocation lists (CRLs), and certification paths. It contains support for X.509 v3 certificates and X.509 v2 CRLs.

## Package Specification

- [**Java™ Cryptography Architecture (JCA) Reference Guide**](https://docs.oracle.com/javase/8/docs/technotes/guides/security/crypto/CryptoSpec.html)
- RFC 5280: Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile
- RFC 2560: X.509 Internet Public Key Infrastructure Online Certificate Status Protocol - OCSP
- [**Java™ Cryptography Architecture Standard Algorithm Name Documentation**](https://docs.oracle.com/javase/8/docs/technotes/guides/security/StandardNames.html)

## Related Documentation

For information about X.509 certificates and CRLs, please see:

- <http://www.ietf.org/rfc/rfc5280.txt>
- [**Java™ PKI Programmer's Guide**](https://docs.oracle.com/javase/8/docs/technotes/guides/security/certpath/CertPathProgGuide.html)
- [**X.509 Certificates and Certificate Revocation Lists (CRLs)**](https://docs.oracle.com/javase/8/docs/technotes/guides/security/cert3.html)

## Interfaces

|---|---|
| [CertPathBuilderResult](https://developer.android.com/reference/java/security/cert/CertPathBuilderResult) | A specification of the result of a certification path builder algorithm. |
| [CertPathChecker](https://developer.android.com/reference/java/security/cert/CertPathChecker) | Performs one or more checks on each `Certificate` of a `CertPath`. |
| [CertPathParameters](https://developer.android.com/reference/java/security/cert/CertPathParameters) | A specification of certification path algorithm parameters. |
| [CertPathValidatorException.Reason](https://developer.android.com/reference/java/security/cert/CertPathValidatorException.Reason) | The reason the validation algorithm failed. |
| [CertPathValidatorResult](https://developer.android.com/reference/java/security/cert/CertPathValidatorResult) | A specification of the result of a certification path validator algorithm. |
| [CertSelector](https://developer.android.com/reference/java/security/cert/CertSelector) | A selector that defines a set of criteria for selecting `Certificate`s. |
| [CertStoreParameters](https://developer.android.com/reference/java/security/cert/CertStoreParameters) | A specification of `CertStore` parameters. |
| [CRLSelector](https://developer.android.com/reference/java/security/cert/CRLSelector) | A selector that defines a set of criteria for selecting `CRL`s. |
| [Extension](https://developer.android.com/reference/java/security/cert/Extension) | This interface represents an X.509 extension. |
| [PolicyNode](https://developer.android.com/reference/java/security/cert/PolicyNode) | An immutable valid policy tree node as defined by the PKIX certification path validation algorithm. |
| [X509Extension](https://developer.android.com/reference/java/security/cert/X509Extension) | Interface for an X.509 extension. |

## Classes

|---|---|
| [Certificate](https://developer.android.com/reference/java/security/cert/Certificate) | Abstract class for managing a variety of identity certificates. |
| [Certificate.CertificateRep](https://developer.android.com/reference/java/security/cert/Certificate.CertificateRep) | Alternate Certificate class for serialization. |
| [CertificateFactory](https://developer.android.com/reference/java/security/cert/CertificateFactory) | This class defines the functionality of a certificate factory, which is used to generate certificate, certification path (`CertPath`) and certificate revocation list (CRL) objects from their encodings. |
| [CertificateFactorySpi](https://developer.android.com/reference/java/security/cert/CertificateFactorySpi) | This class defines the *Service Provider Interface* (**SPI** ) for the `CertificateFactory` class. |
| [CertPath](https://developer.android.com/reference/java/security/cert/CertPath) | An immutable sequence of certificates (a certification path). |
| [CertPath.CertPathRep](https://developer.android.com/reference/java/security/cert/CertPath.CertPathRep) | Alternate `CertPath` class for serialization. |
| [CertPathBuilder](https://developer.android.com/reference/java/security/cert/CertPathBuilder) | A class for building certification paths (also known as certificate chains). |
| [CertPathBuilderSpi](https://developer.android.com/reference/java/security/cert/CertPathBuilderSpi) | The *Service Provider Interface* (**SPI** ) for the `https://developer.android.com/reference/java/security/cert/CertPathBuilder` class. |
| [CertPathValidator](https://developer.android.com/reference/java/security/cert/CertPathValidator) | A class for validating certification paths (also known as certificate chains). |
| [CertPathValidatorSpi](https://developer.android.com/reference/java/security/cert/CertPathValidatorSpi) | The *Service Provider Interface* (**SPI** ) for the `https://developer.android.com/reference/java/security/cert/CertPathValidator` class. |
| [CertStore](https://developer.android.com/reference/java/security/cert/CertStore) | A class for retrieving `Certificate`s and `CRL`s from a repository. |
| [CertStoreSpi](https://developer.android.com/reference/java/security/cert/CertStoreSpi) | The *Service Provider Interface* (**SPI** ) for the `https://developer.android.com/reference/java/security/cert/CertStore` class. |
| [CollectionCertStoreParameters](https://developer.android.com/reference/java/security/cert/CollectionCertStoreParameters) | Parameters used as input for the Collection `CertStore` algorithm. |
| [CRL](https://developer.android.com/reference/java/security/cert/CRL) | This class is an abstraction of certificate revocation lists (CRLs) that have different formats but important common uses. |
| [LDAPCertStoreParameters](https://developer.android.com/reference/java/security/cert/LDAPCertStoreParameters) | Parameters used as input for the LDAP `CertStore` algorithm. |
| [PKIXBuilderParameters](https://developer.android.com/reference/java/security/cert/PKIXBuilderParameters) | Parameters used as input for the PKIX `CertPathBuilder` algorithm. |
| [PKIXCertPathBuilderResult](https://developer.android.com/reference/java/security/cert/PKIXCertPathBuilderResult) | This class represents the successful result of the PKIX certification path builder algorithm. |
| [PKIXCertPathChecker](https://developer.android.com/reference/java/security/cert/PKIXCertPathChecker) | An abstract class that performs one or more checks on an `X509Certificate`. |
| [PKIXCertPathValidatorResult](https://developer.android.com/reference/java/security/cert/PKIXCertPathValidatorResult) | This class represents the successful result of the PKIX certification path validation algorithm. |
| [PKIXParameters](https://developer.android.com/reference/java/security/cert/PKIXParameters) | Parameters used as input for the PKIX `CertPathValidator` algorithm. |
| [PKIXRevocationChecker](https://developer.android.com/reference/java/security/cert/PKIXRevocationChecker) | A `PKIXCertPathChecker` for checking the revocation status of certificates with the PKIX algorithm. |
| [PolicyQualifierInfo](https://developer.android.com/reference/java/security/cert/PolicyQualifierInfo) | An immutable policy qualifier represented by the ASN.1 PolicyQualifierInfo structure. |
| [TrustAnchor](https://developer.android.com/reference/java/security/cert/TrustAnchor) | A trust anchor or most-trusted Certification Authority (CA). |
| [URICertStoreParameters](https://developer.android.com/reference/java/security/cert/URICertStoreParameters) | Parameters used as input for `CertStore` algorithms which use information contained in a URI to retrieve certificates and CRLs. |
| [X509Certificate](https://developer.android.com/reference/java/security/cert/X509Certificate) | Abstract class for X.509 certificates. |
| [X509CertSelector](https://developer.android.com/reference/java/security/cert/X509CertSelector) | A `CertSelector` that selects `X509Certificates` that match all specified criteria. |
| [X509CRL](https://developer.android.com/reference/java/security/cert/X509CRL) | Abstract class for an X.509 Certificate Revocation List (CRL). |
| [X509CRLEntry](https://developer.android.com/reference/java/security/cert/X509CRLEntry) | Abstract class for a revoked certificate in a CRL (Certificate Revocation List). |
| [X509CRLSelector](https://developer.android.com/reference/java/security/cert/X509CRLSelector) | A `CRLSelector` that selects `X509CRLs` that match all specified criteria. |

## Enums

|---|---|
| [CertPathValidatorException.BasicReason](https://developer.android.com/reference/java/security/cert/CertPathValidatorException.BasicReason) | The BasicReason enumerates the potential reasons that a certification path of any type may be invalid. |
| [CRLReason](https://developer.android.com/reference/java/security/cert/CRLReason) | The CRLReason enumeration specifies the reason that a certificate is revoked, as defined in [RFC 5280: Internet X.509 Public Key Infrastructure Certificate and CRL Profile](http://tools.ietf.org/html/rfc5280). |
| [PKIXReason](https://developer.android.com/reference/java/security/cert/PKIXReason) | The `PKIXReason` enumerates the potential PKIX-specific reasons that an X.509 certification path may be invalid according to the PKIX (RFC 5280) standard. |
| [PKIXRevocationChecker.Option](https://developer.android.com/reference/java/security/cert/PKIXRevocationChecker.Option) | Various revocation options that can be specified for the revocation checking mechanism. |

## Exceptions

|---|---|
| [CertificateEncodingException](https://developer.android.com/reference/java/security/cert/CertificateEncodingException) | Certificate Encoding Exception. |
| [CertificateException](https://developer.android.com/reference/java/security/cert/CertificateException) | This exception indicates one of a variety of certificate problems. |
| [CertificateExpiredException](https://developer.android.com/reference/java/security/cert/CertificateExpiredException) | Certificate Expired Exception. |
| [CertificateNotYetValidException](https://developer.android.com/reference/java/security/cert/CertificateNotYetValidException) | Certificate is not yet valid exception. |
| [CertificateParsingException](https://developer.android.com/reference/java/security/cert/CertificateParsingException) | Certificate Parsing Exception. |
| [CertificateRevokedException](https://developer.android.com/reference/java/security/cert/CertificateRevokedException) | An exception that indicates an X.509 certificate is revoked. |
| [CertPathBuilderException](https://developer.android.com/reference/java/security/cert/CertPathBuilderException) | An exception indicating one of a variety of problems encountered when building a certification path with a `CertPathBuilder`. |
| [CertPathValidatorException](https://developer.android.com/reference/java/security/cert/CertPathValidatorException) | An exception indicating one of a variety of problems encountered when validating a certification path. |
| [CertStoreException](https://developer.android.com/reference/java/security/cert/CertStoreException) | An exception indicating one of a variety of problems retrieving certificates and CRLs from a `CertStore`. |
| [CRLException](https://developer.android.com/reference/java/security/cert/CRLException) | CRL (Certificate Revocation List) Exception. |

-

  ## Interfaces

  - [CertPathBuilderResult](https://developer.android.com/reference/java/security/cert/CertPathBuilderResult)
  - [CertPathChecker](https://developer.android.com/reference/java/security/cert/CertPathChecker)
  - [CertPathParameters](https://developer.android.com/reference/java/security/cert/CertPathParameters)
  - [CertPathValidatorException.Reason](https://developer.android.com/reference/java/security/cert/CertPathValidatorException.Reason)
  - [CertPathValidatorResult](https://developer.android.com/reference/java/security/cert/CertPathValidatorResult)
  - [CertSelector](https://developer.android.com/reference/java/security/cert/CertSelector)
  - [CertStoreParameters](https://developer.android.com/reference/java/security/cert/CertStoreParameters)
  - [CRLSelector](https://developer.android.com/reference/java/security/cert/CRLSelector)
  - [Extension](https://developer.android.com/reference/java/security/cert/Extension)
  - [PolicyNode](https://developer.android.com/reference/java/security/cert/PolicyNode)
  - [X509Extension](https://developer.android.com/reference/java/security/cert/X509Extension)
-

  ## Classes

  - [Certificate](https://developer.android.com/reference/java/security/cert/Certificate)
  - [Certificate.CertificateRep](https://developer.android.com/reference/java/security/cert/Certificate.CertificateRep)
  - [CertificateFactory](https://developer.android.com/reference/java/security/cert/CertificateFactory)
  - [CertificateFactorySpi](https://developer.android.com/reference/java/security/cert/CertificateFactorySpi)
  - [CertPath](https://developer.android.com/reference/java/security/cert/CertPath)
  - [CertPath.CertPathRep](https://developer.android.com/reference/java/security/cert/CertPath.CertPathRep)
  - [CertPathBuilder](https://developer.android.com/reference/java/security/cert/CertPathBuilder)
  - [CertPathBuilderSpi](https://developer.android.com/reference/java/security/cert/CertPathBuilderSpi)
  - [CertPathValidator](https://developer.android.com/reference/java/security/cert/CertPathValidator)
  - [CertPathValidatorSpi](https://developer.android.com/reference/java/security/cert/CertPathValidatorSpi)
  - [CertStore](https://developer.android.com/reference/java/security/cert/CertStore)
  - [CertStoreSpi](https://developer.android.com/reference/java/security/cert/CertStoreSpi)
  - [CollectionCertStoreParameters](https://developer.android.com/reference/java/security/cert/CollectionCertStoreParameters)
  - [CRL](https://developer.android.com/reference/java/security/cert/CRL)
  - [LDAPCertStoreParameters](https://developer.android.com/reference/java/security/cert/LDAPCertStoreParameters)
  - [PKIXBuilderParameters](https://developer.android.com/reference/java/security/cert/PKIXBuilderParameters)
  - [PKIXCertPathBuilderResult](https://developer.android.com/reference/java/security/cert/PKIXCertPathBuilderResult)
  - [PKIXCertPathChecker](https://developer.android.com/reference/java/security/cert/PKIXCertPathChecker)
  - [PKIXCertPathValidatorResult](https://developer.android.com/reference/java/security/cert/PKIXCertPathValidatorResult)
  - [PKIXParameters](https://developer.android.com/reference/java/security/cert/PKIXParameters)
  - [PKIXRevocationChecker](https://developer.android.com/reference/java/security/cert/PKIXRevocationChecker)
  - [PolicyQualifierInfo](https://developer.android.com/reference/java/security/cert/PolicyQualifierInfo)
  - [TrustAnchor](https://developer.android.com/reference/java/security/cert/TrustAnchor)
  - [URICertStoreParameters](https://developer.android.com/reference/java/security/cert/URICertStoreParameters)
  - [X509Certificate](https://developer.android.com/reference/java/security/cert/X509Certificate)
  - [X509CertSelector](https://developer.android.com/reference/java/security/cert/X509CertSelector)
  - [X509CRL](https://developer.android.com/reference/java/security/cert/X509CRL)
  - [X509CRLEntry](https://developer.android.com/reference/java/security/cert/X509CRLEntry)
  - [X509CRLSelector](https://developer.android.com/reference/java/security/cert/X509CRLSelector)
-

  ## Enums

  - [CertPathValidatorException.BasicReason](https://developer.android.com/reference/java/security/cert/CertPathValidatorException.BasicReason)
  - [CRLReason](https://developer.android.com/reference/java/security/cert/CRLReason)
  - [PKIXReason](https://developer.android.com/reference/java/security/cert/PKIXReason)
  - [PKIXRevocationChecker.Option](https://developer.android.com/reference/java/security/cert/PKIXRevocationChecker.Option)
-

  ## Exceptions

  - [CertificateEncodingException](https://developer.android.com/reference/java/security/cert/CertificateEncodingException)
  - [CertificateException](https://developer.android.com/reference/java/security/cert/CertificateException)
  - [CertificateExpiredException](https://developer.android.com/reference/java/security/cert/CertificateExpiredException)
  - [CertificateNotYetValidException](https://developer.android.com/reference/java/security/cert/CertificateNotYetValidException)
  - [CertificateParsingException](https://developer.android.com/reference/java/security/cert/CertificateParsingException)
  - [CertificateRevokedException](https://developer.android.com/reference/java/security/cert/CertificateRevokedException)
  - [CertPathBuilderException](https://developer.android.com/reference/java/security/cert/CertPathBuilderException)
  - [CertPathValidatorException](https://developer.android.com/reference/java/security/cert/CertPathValidatorException)
  - [CertStoreException](https://developer.android.com/reference/java/security/cert/CertStoreException)
  - [CRLException](https://developer.android.com/reference/java/security/cert/CRLException)