public class OCSPRevocationChecker extends java.lang.Object implements RevocationChecker
| Modifier and Type | Field and Description |
|---|---|
protected static int |
CLOCK_SKEW
Clock sync between client and server can be just over an hour
and 6 minutes (4000 seconds) - 1:06:40.
|
LOG| Constructor and Description |
|---|
OCSPRevocationChecker(OCSPConfiguration config,
KeyAndCertContainer keyMaterial,
ValidationInfo validationInfo)
The OCSPRevocationChecker constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
check(X509Certificate certificate)
This method will check Revocation of the given certificate using OCSP.
|
void |
check(X509Certificate[] chain)
Given a certificate chain, this method will check Revocation on the chain
using OCSP.
|
void |
check(X509Certificate cert,
X509Certificate[] chain)
The Main method of checking whether the certificate is revoked in the OCSP revocation checkers.
|
void |
check(X509Certificate certificate,
X509Certificate[] chain,
int position)
This method will check Revocation of the given certificate using OCSP.
|
boolean |
equals(java.lang.Object obj)
Tests whether the
OCSPConfiguration stored in the OCSPRevocationChecker object is
equal to the OCSPConfiguration stored in the passed in OCSPRevocationChecker. |
protected static final int CLOCK_SKEW
public OCSPRevocationChecker(OCSPConfiguration config, KeyAndCertContainer keyMaterial, ValidationInfo validationInfo)
This class creates an OCSPRevocationChecker given an OCSPConfiguration. The OCSPConfiguration must not be null, otherwise an IllegalArgumentException will be thrown.
A ValidationInfo object is also required, and cannot be null.
Optionally, a KeyAndCertContainer can be passed to as a source of KeyAndCertificate information. This object is only required if OCSP client requests will be signed.
config - The OCSPConfiguration associated with this RevocationCheckerkeyMaterial - The key material that can be used to sign OCSP requestsvalidationInfo - The validationInfo associated with this revocation checkerjava.lang.IllegalArgumentException - if the OCSPConfiguration or ValidationInfo
parameters are null.public void check(X509Certificate[] chain) throws CertificationException
OCSPConfiguration specified by this
revocation checker, one of the following will be done:
1. If AIAChecking is false, and no local accessLocation is defined, an exception is thrown indicating nothing can be done.
2. If AIAChecking is true, and no local accessLocation is defined, then only the accessLocation(s) in the AIA will be used to try and determine revocaton status.
3. If AIAChecking is true, and a local accessLocation is defined, then any accessLocations contained in the AIA location of the certificate will first be checked. If no successful revocation status is found then the local accessLocation will be checked if the certificates issuer DN is configured in the local configuraitons DN list, or if there are no certificates in the DN list (indicating revocation should always be used for this responder).
4. If AIAChecking is false, and there is a locally defined accessLocation, the local accessLocation will be checked if the certificates issuer DN is configured in the local configurations DN list, or if there are no certificates in the DN list (indicating revocation should always be used for this responder).
check in interface RevocationCheckerchain - The chain of certificates to be checked for revocation. If the given chain
is null, then the method just returns.CertificationException - if revocation status could not be determinedRevocationException - if the status of the certificate was revoked.public void check(X509Certificate certificate, X509Certificate[] chain, int position) throws CertificationException
OCSPConfiguration specified by this
revocation checker, one of the following will be done:
1. If AIAChecking is false, and no local accessLocation is defined, an exception is thrown indicating nothing can be done.
2. If AIAChecking is true, and no local accessLocation is defined, then only the accessLocation(s) in the AIA will be used to try and determine revocaton status.
3. If AIAChecking is true, and a local accessLocation is defined, then any accessLocations contained in the AIA location of the certificate will first be checked. If no successful revocation status is found then the local accessLocation will be checked if the certificates issuer DN is configured in the local configuraitons DN list, or if there are no certificates in the DN list (indicating revocation should always be used for this responder).
4. If AIAChecking is false, and there is a locally defined accessLocation, the local accessLocation will be checked if the certificates issuer DN is configured in the local configurations DN list, or if there are no certificates in the DN list (indicating revocation should always be used for this responder).
The position is the integer position of the certificate in the chain. This position is not required, but if used may help to speed up Issuer certificate searches. Especially with long certificate chains.
check in interface RevocationCheckercertificate - the certificate which revocation will be checkedchain - the certificate chainposition - of certificate in chainCertificationException - if revocation status could not be determinedRevocationException - if the status of the certificate was revoked.public void check(X509Certificate certificate) throws CertificationException
OCSPConfiguration specified by this
revocation checker, one of the following will be done:
1. If AIAChecking is false, and no local accessLocation is defined, an exception is thrown indicating nothing can be done.
2. If AIAChecking is true, and no local accessLocation is defined, then only the accessLocation(s) in the AIA will be used to try and determine revocaton status.
3. If AIAChecking is true, and a local accessLocation is defined, then any accessLocations contained in the AIA location of the certificate will first be checked. If no successful revocation status is found then the local accessLocation will be checked if the certificates issuer DN is configured in the local configuraitons DN list, or if there are no certificates in the DN list (indicating revocation should always be used for this responder).
4. If AIAChecking is false, and there is a locally defined accessLocation, the local accessLocation will be checked if the certificates issuer DN is configured in the local configurations DN list, or if there are no certificates in the DN list (indicating revocation should always be used for this responder).
The position is the integer position of the certificate in the chain. This position is not required, but if used may help to speed up Issuer certificate searches. Especially with long certificate chains.
check in interface RevocationCheckercertificate - the certificate which revocation will be checkedCertificationException - if revocation status could not be determined.RevocationException - if the status of the certificate was revoked.public void check(X509Certificate cert, X509Certificate[] chain) throws CertificationException
1. If AIAChecking is false, and no local accessLocation is defined, an exception is thrown indicating nothing can be done.
2. If AIAChecking is true, and no local accessLocation is defined, then only the accessLocation(s) in the AIA will be used to try and determine revocaton status.
3. If AIAChecking is true, and a local accessLocation is defined, then any accessLocations contained in the AIA location of the certificate will first be checked. If no successful revocation status is found then the local accessLocation will be checked if the certificates issuer DN is configured in the local configuraitons DN list, or if there are no certificates in the DN list (indicating revocation should always be used for this responder).
4. If AIAChecking is false, and there is a locally defined accessLocation, the local accessLocation will be checked if the certificates issuer DN is configured in the local configurations DN list, or if there are no certificates in the DN list (indicating revocation should always be used for this responder).
check in interface RevocationCheckercert - The certificate being checked for revocationchain - the complete certificate chain in which cert is included.CertificationException - if no revocation information can be found.RevocationException - if certificate is revoked.public boolean equals(java.lang.Object obj)
OCSPConfiguration stored in the OCSPRevocationChecker object is
equal to the OCSPConfiguration stored in the passed in OCSPRevocationChecker.equals in class java.lang.Object