public class CertificateValidator extends Object
| Constructor and Description |
|---|
CertificateValidator(KeyStore trustStore,
Collection<? extends CRL> crls)
creates an instance of the certificate validator
|
CertificateValidator(X509Certificate[] trustedCert,
Collection<? extends CRL> crls) |
| Modifier and Type | Method and Description |
|---|---|
Collection<? extends CRL> |
getCrls() |
Date |
getDate() |
int |
getMaxCertPathLength() |
String |
getOcspResponderURL() |
boolean |
isEnableCRLDP() |
boolean |
isEnableOCSP() |
void |
setDate(Date date) |
void |
setEnableCRLDP(boolean enableCRLDP)
Enables CRL Distribution Points Support
|
void |
setEnableOCSP(boolean enableOCSP)
Enables On-Line Certificate Status Protocol support
|
void |
setMaxCertPathLength(int maxCertPathLength) |
void |
setOcspResponderURL(String ocspResponderURL)
Set the location of the OCSP Responder.
|
void |
validate(Certificate[] certChain) |
public CertificateValidator(KeyStore trustStore, Collection<? extends CRL> crls)
trustStore - the truststore to usecrls - the Certificate Revocation List to usepublic CertificateValidator(X509Certificate[] trustedCert, Collection<? extends CRL> crls)
public void validate(Certificate[] certChain) throws CertificateException
CertificateExceptionpublic Collection<? extends CRL> getCrls()
public int getMaxCertPathLength()
public void setMaxCertPathLength(int maxCertPathLength)
maxCertPathLength - maximum number of intermediate certificates in
the certification path (-1 for unlimited)public boolean isEnableCRLDP()
public void setEnableCRLDP(boolean enableCRLDP)
enableCRLDP - true - turn on, false - turns offpublic boolean isEnableOCSP()
public void setEnableOCSP(boolean enableOCSP)
enableOCSP - true - turn on, false - turn offpublic String getOcspResponderURL()
public void setOcspResponderURL(String ocspResponderURL)
ocspResponderURL - location of the OCSP Responderpublic Date getDate()
public void setDate(Date date)
Copyright © 2015–2018. All rights reserved.