Important Note
at least one of the above mechanisms *MUST* be configured and operational, otherwise certificate validation *WILL FAIL* unconditionally.
| Modifier and Type | Field and Description |
|---|---|
| private static AtomicLong | |
| private Collection | |
| private boolean | _enableCRLDP
CRL Distribution Points (CRLDP) support |
| private boolean | _enableOCSP
On-Line Certificate Status Protocol (OCSP) support |
| private int | _maxCertPathLength
Maximum certification path length (n - number of intermediate certs, -1 for unlimited) |
| private String | _ocspResponderURL
Location of OCSP Responder |
| private KeyStore | |
| private static final Logger |
| Access | Constructor and Description |
|---|---|
| public | CertificateValidator(KeyStore
the truststore to use trustStore, Collection<? extends CRL> the Certificate Revocation List to use crls)creates an instance of the certificate validator |
| Modifier and Type | Method and Description |
|---|---|
| public Collection | |
| public int | Returns: Maximum number of intermediate certificates in the certification path (-1 for unlimited)
|
| public String | |
| public KeyStore | |
| public boolean | |
| public boolean | |
| public void | setEnableCRLDP(boolean
true - turn on, false - turns off enableCRLDP)Enables CRL Distribution Points Support |
| public void | setEnableOCSP(boolean
true - turn on, false - turn off enableOCSP)Enables On-Line Certificate Status Protocol support |
| public void | setMaxCertPathLength(int
maximum number of intermediate certificates in
the certification path (-1 for unlimited) maxCertPathLength)
|
| public void | setOcspResponderURL(String
location of the OCSP Responder ocspResponderURL)Set the location of the OCSP Responder. |
| public void | |
| public String | |
| public void | validate(KeyStore
the keystore to validate against keyStore, Certificate the certificate to validate cert)validates a specific certificate inside of the keystore being passed in |
| public void |
| __aliasCount | back to summary |
|---|---|
| private static AtomicLong __aliasCount | |
| _crls | back to summary |
|---|---|
| private Collection<? extends CRL> _crls | |
| _enableCRLDP | back to summary |
|---|---|
| private boolean _enableCRLDP CRL Distribution Points (CRLDP) support | |
| _enableOCSP | back to summary |
|---|---|
| private boolean _enableOCSP On-Line Certificate Status Protocol (OCSP) support | |
| _maxCertPathLength | back to summary |
|---|---|
| private int _maxCertPathLength Maximum certification path length (n - number of intermediate certs, -1 for unlimited) | |
| _ocspResponderURL | back to summary |
|---|---|
| private String _ocspResponderURL Location of OCSP Responder | |
| _trustStore | back to summary |
|---|---|
| private KeyStore _trustStore | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| CertificateValidator | back to summary |
|---|---|
| public CertificateValidator(KeyStore trustStore, Collection<? extends CRL> crls) creates an instance of the certificate validator
| |
| getCrls | back to summary |
|---|---|
| public Collection | |
| getMaxCertPathLength | back to summary |
|---|---|
public int getMaxCertPathLength()
| |
| getOcspResponderURL | back to summary |
|---|---|
public String getOcspResponderURL()
| |
| getTrustStore | back to summary |
|---|---|
| public KeyStore getTrustStore() | |
| isEnableCRLDP | back to summary |
|---|---|
public boolean isEnableCRLDP()
| |
| isEnableOCSP | back to summary |
|---|---|
public boolean isEnableOCSP()
| |
| setEnableCRLDP | back to summary |
|---|---|
| public void setEnableCRLDP(boolean enableCRLDP) Enables CRL Distribution Points Support
| |
| setEnableOCSP | back to summary |
|---|---|
| public void setEnableOCSP(boolean enableOCSP) Enables On-Line Certificate Status Protocol support
| |
| setMaxCertPathLength | back to summary |
|---|---|
public void setMaxCertPathLength(int maxCertPathLength)
| |
| setOcspResponderURL | back to summary |
|---|---|
| public void setOcspResponderURL(String ocspResponderURL) Set the location of the OCSP Responder.
| |
| validate | back to summary |
|---|---|
| public void validate(KeyStore keyStore) throws CertificateException validates all aliases inside of a given keystore
| |
| validate | back to summary |
|---|---|
| public String validate(KeyStore keyStore, String keyAlias) throws CertificateException validates a specific alias inside of the keystore being passed in
| |
| validate | back to summary |
|---|---|
| public void validate(KeyStore keyStore, Certificate cert) throws CertificateException validates a specific certificate inside of the keystore being passed in
| |
| validate | back to summary |
|---|---|
| public void validate(Certificate[] certChain) throws CertificateException | |