public abstract class AbstractCRLRevocationChecker extends java.lang.Object implements RevocationChecker
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
checkAll
Flag to indicate whether all
crls should be checked for the cert resource.
|
protected org.slf4j.Logger |
logger
Logger instance.
|
| Constructor and Description |
|---|
AbstractCRLRevocationChecker() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract boolean |
addCRL(java.lang.Object id,
java.security.cert.X509CRL crl)
Records the addition of a new CRL entry.
|
void |
check(java.security.cert.X509Certificate cert)
Checks the revocation status of the given certificate.
|
java.security.cert.X509CRL |
getCRL(java.security.cert.X509Certificate cert)
Gets the first fetched CRL for the given certificate.
|
protected abstract java.util.Collection<java.security.cert.X509CRL> |
getCRLs(java.security.cert.X509Certificate cert)
Gets the collection of CRLs for the given certificate.
|
RevocationPolicy<java.security.cert.X509CRL> |
getExpiredCRLPolicy() |
RevocationPolicy<java.lang.Void> |
getUnavailableCRLPolicy() |
void |
init()
Init.
|
void |
setCheckAll(boolean checkAll)
Indicates whether all resources should be checked,
or revocation should stop at the first resource
that produces the cert.
|
void |
setExpiredCRLPolicy(RevocationPolicy<java.security.cert.X509CRL> policy)
Sets the policy to apply when CRL data is expired.
|
void |
setUnavailableCRLPolicy(RevocationPolicy<java.lang.Void> policy)
Sets the policy to apply when CRL data is unavailable.
|
protected transient org.slf4j.Logger logger
protected boolean checkAll
false.@PostConstruct public void init()
public void check(java.security.cert.X509Certificate cert)
throws java.security.GeneralSecurityException
RevocationCheckercheck in interface RevocationCheckercert - Certificate to examine.java.security.GeneralSecurityException - If certificate has been revoked or the revocation
check fails for some reason such as revocation data not available.public void setUnavailableCRLPolicy(RevocationPolicy<java.lang.Void> policy)
policy - Revocation policy.public void setExpiredCRLPolicy(RevocationPolicy<java.security.cert.X509CRL> policy)
policy - Revocation policy.public RevocationPolicy<java.lang.Void> getUnavailableCRLPolicy()
public RevocationPolicy<java.security.cert.X509CRL> getExpiredCRLPolicy()
@Autowired
public void setCheckAll(@Value(value="${cas.x509.authn.crl.checkAll:false}")
boolean checkAll)
checkAll - the check allpublic java.security.cert.X509CRL getCRL(java.security.cert.X509Certificate cert)
cert - Certificate for which the CRL of the issuing CA should be retrieved.protected abstract boolean addCRL(java.lang.Object id,
java.security.cert.X509CRL crl)
id - the id of the entry to keep track ofcrl - new CRL entryprotected abstract java.util.Collection<java.security.cert.X509CRL> getCRLs(java.security.cert.X509Certificate cert)
cert - Certificate for which the CRL of the issuing CA should be retrieved.