PKIXCertPathChecker
for checking the revocation status of
certificates with the PKIX algorithm.
A PKIXRevocationChecker
checks the revocation status of
certificates with the Online Certificate Status Protocol (OCSP) or
Certificate Revocation Lists (CRLs). OCSP is described in RFC 2560 and
is a network protocol for determining the status of a certificate. A CRL
is a time-stamped list identifying revoked certificates, and RFC 5280
describes an algorithm for determining the revocation status of certificates
using CRLs.
Each PKIXRevocationChecker
must be able to check the revocation
status of certificates with OCSP and CRLs. By default, OCSP is the
preferred mechanism for checking revocation status, with CRLs as the
fallback mechanism. However, this preference can be switched to CRLs with
the PREFER_CRLS
option. In addition, the fallback
mechanism can be disabled with the NO_FALLBACK
option.
A PKIXRevocationChecker
is obtained by calling the
getRevocationChecker
method
of a PKIX CertPathValidator
. Additional parameters and options
specific to revocation can be set (by calling the
setOcspResponder
method for instance). The
PKIXRevocationChecker
is added to a PKIXParameters
object
using the addCertPathChecker
or setCertPathCheckers
method,
and then the PKIXParameters
is passed along with the CertPath
to be validated to the validate
method
of a PKIX CertPathValidator
. When supplying a revocation checker in
this manner, it will be used to check revocation irrespective of the setting
of the RevocationEnabled
flag,
and will override the default revocation checking mechanism of the PKIX
service provider. Similarly, a PKIXRevocationChecker
may be added
to a PKIXBuilderParameters
object for use with a PKIX
CertPathBuilder
.
Note that when a PKIXRevocationChecker
is added to
PKIXParameters
, it clones the PKIXRevocationChecker
;
thus any subsequent modifications to the PKIXRevocationChecker
have no effect.
Any parameter that is not set (or is set to null
) will be set to
the default value for that parameter.
Concurrent Access
Unless otherwise specified, the methods defined in this class are not thread-safe. Multiple threads that need to access a single object concurrently should synchronize amongst themselves and provide the necessary locking. Multiple threads each manipulating separate objects need not synchronize.
Modifier and Type | Class and Description |
---|---|
public static enum | PKIXRevocationChecker.
Various revocation options that can be specified for the revocation checking mechanism. |
Modifier and Type | Field and Description |
---|---|
private List | |
private URI | |
private X509Certificate | |
private Map | |
private Set |
Access | Constructor and Description |
---|---|
protected |
Modifier and Type | Method and Description |
---|---|
public PKIXRevocationChecker | |
public List | Returns: an unmodifiable list of extensions. The list is empty if no extensions have been specified.Gets the optional OCSP request extensions. |
public URI | Returns: the responder URI, ornull if not setGets the URI that identifies the location of the OCSP responder. |
public X509Certificate | Returns: the responder's certificate, ornull if not setGets the OCSP responder's certificate. |
public Map | Returns: a map of OCSP responses. Each key is anX509Certificate that maps to the corresponding
DER-encoded OCSP response for that certificate. A deep copy of
the map is returned to protect against subsequent modification.
Returns an empty map if no responses have been specified.Gets the OCSP responses. |
public Set | Returns: an unmodifiable set of revocation options. The set is empty if no options have been specified.Gets the revocation options. |
public abstract List | Returns: an unmodifiable list containing the ignored exceptions. The list is empty if no exceptions have been ignored.Returns a list containing the exceptions that are ignored by the
revocation checker when the |
public void | setOcspExtensions(List<Extension>
a list of extensions. The list is copied to protect
against subsequent modification. extensions)Sets the optional OCSP request extensions. |
public void | setOcspResponder(URI
the responder URI uri)Sets the URI that identifies the location of the OCSP responder. |
public void | setOcspResponderCert(X509Certificate
the responder's certificate cert)Sets the OCSP responder's certificate. |
public void | setOcspResponses(Map<X509Certificate, byte[]>
a map of OCSP responses. Each key is an
responses)X509Certificate that maps to the corresponding
DER-encoded OCSP response for that certificate. A deep copy of
the map is performed to protect against subsequent modification.Sets the OCSP responses. |
public void | setOptions(Set<PKIXRevocationChecker.
a set of revocation options. The set is copied to protect
against subsequent modification. optionsSets the revocation options. |
ocspExtensions | back to summary |
---|---|
private List<Extension> ocspExtensions |
ocspResponder | back to summary |
---|---|
private URI ocspResponder |
ocspResponderCert | back to summary |
---|---|
private X509Certificate ocspResponderCert |
ocspResponses | back to summary |
---|---|
private Map<X509Certificate, byte[]> ocspResponses |
options | back to summary |
---|---|
private Set<PKIXRevocationChecker. |
PKIXRevocationChecker | back to summary |
---|---|
protected PKIXRevocationChecker() Default constructor. |
clone | back to summary |
---|---|
public PKIXRevocationChecker clone() Overrides java. Doc from java. Returns a clone of this object. Calls the
|
getOcspExtensions | back to summary |
---|---|
public List Gets the optional OCSP request extensions. |
getOcspResponder | back to summary |
---|---|
public URI getOcspResponder() Gets the URI that identifies the location of the OCSP responder. This
overrides the
|
getOcspResponderCert | back to summary |
---|---|
public X509Certificate getOcspResponderCert() Gets the OCSP responder's certificate. This overrides the
|
getOcspResponses | back to summary |
---|---|
public Map Gets the OCSP responses. These responses are used to determine the revocation status of the specified certificates when OCSP is used.
|
getOptions | back to summary |
---|---|
public Set Gets the revocation options.
|
getSoftFailExceptions | back to summary |
---|---|
public abstract List Returns a list containing the exceptions that are ignored by the
revocation checker when the
An implementation of
|
setOcspExtensions | back to summary |
---|---|
public void setOcspExtensions(List<Extension> extensions) Sets the optional OCSP request extensions. |
setOcspResponder | back to summary |
---|---|
public void setOcspResponder(URI uri) Sets the URI that identifies the location of the OCSP responder. This
overrides the
|
setOcspResponderCert | back to summary |
---|---|
public void setOcspResponderCert(X509Certificate cert) Sets the OCSP responder's certificate. This overrides the
|
setOcspResponses | back to summary |
---|---|
public void setOcspResponses(Map<X509Certificate, byte[]> responses) Sets the OCSP responses. These responses are used to determine the revocation status of the specified certificates when OCSP is used.
|
setOptions | back to summary |
---|---|
public void setOptions(Set<PKIXRevocationChecker. Sets the revocation options.
|
Modifier and Type | Field and Description |
---|---|
public static final PKIXRevocationChecker. | NO_FALLBACK
Disable the fallback mechanism. |
public static final PKIXRevocationChecker. | ONLY_END_ENTITY
Only check the revocation status of end-entity certificates. |
public static final PKIXRevocationChecker. | PREFER_CRLS
Prefer CRLs to OSCP. |
public static final PKIXRevocationChecker. | SOFT_FAIL
Allow revocation check to succeed if the revocation status cannot be determined for one of the following reasons:
|
Access | Constructor and Description |
---|---|
private |
Modifier and Type | Method and Description |
---|---|
public static PKIXRevocationChecker. | |
public static PKIXRevocationChecker. |
NO_FALLBACK | back to summary |
---|---|
public static final PKIXRevocationChecker. Disable the fallback mechanism. |
ONLY_END_ENTITY | back to summary |
---|---|
public static final PKIXRevocationChecker. Only check the revocation status of end-entity certificates. |
PREFER_CRLS | back to summary |
---|---|
public static final PKIXRevocationChecker. Prefer CRLs to OSCP. The default behavior is to prefer OCSP. Each PKIX implementation should document further details of their specific preference rules and fallback policies. |
SOFT_FAIL | back to summary |
---|---|
public static final PKIXRevocationChecker. Allow revocation check to succeed if the revocation status cannot be determined for one of the following reasons:
Note that these conditions apply to both OCSP and CRLs, and unless the NO_FALLBACK option is set, the revocation check is
allowed to succeed only if both mechanisms fail under one of the
conditions as stated above.
Exceptions that cause the network errors are ignored but can be
later retrieved by calling the
getSoftFailExceptions method.
|
Option | back to summary |
---|---|
private Option() |
valueOf | back to summary |
---|---|
public static PKIXRevocationChecker. |
values | back to summary |
---|---|
public static PKIXRevocationChecker. |