public final class OCSPClient extends Object
| Constructor and Description |
|---|
OCSPClient(TrustStore trustStore,
boolean useResultCache)
Creates an OCSPClient instace.
|
OCSPClient(TrustStore trustStore,
boolean useResultCache,
List<lv.eparaksts.org.bouncycastle.v170.cert.ocsp.OCSPResp> ocspStore) |
| Modifier and Type | Method and Description |
|---|---|
lv.eparaksts.org.bouncycastle.v170.cert.ocsp.OCSPReq |
generateOCSPRequest(List<lv.eparaksts.org.bouncycastle.v170.cert.ocsp.CertificateID> certificateIDList,
byte[] nonce) |
static List<lv.eparaksts.org.bouncycastle.v170.cert.ocsp.CertificateID> |
getCertificateIDList(Map<BigInteger,X509Certificate> certificateMap) |
static X509Certificate |
getOCSPResponderCert(lv.eparaksts.org.bouncycastle.v170.cert.ocsp.BasicOCSPResp basicResponse) |
CertValidatorResult.OCSPResult |
getOCSPResult(Map<BigInteger,X509Certificate> certificateMap,
String responderURL,
Date validationTime)
Requests certificate status using OCSP responder service.
|
CertValidatorResult.OCSPResult |
getOCSPResult(X509Certificate userCert,
X509Certificate issuerCert,
Date validationTime)
Requests certificate status using OCSP responder service.
|
static byte[] |
getResponseNonce(lv.eparaksts.org.bouncycastle.v170.cert.ocsp.BasicOCSPResp basicResp) |
String |
getResponseStatusMessage(int status) |
protected static boolean |
idEquals(lv.eparaksts.org.bouncycastle.v170.cert.ocsp.CertificateID id1,
lv.eparaksts.org.bouncycastle.v170.cert.ocsp.CertificateID id2) |
static X509Certificate |
resolveOCSPResponderCert(TrustStore trustStore,
lv.eparaksts.org.bouncycastle.v170.cert.ocsp.BasicOCSPResp basicResponse) |
static String |
resolveOCSPResponderURL(X509Certificate userCert,
X509Certificate issuerCert) |
lv.eparaksts.org.bouncycastle.v170.cert.ocsp.OCSPResp |
sendRequest(lv.eparaksts.org.bouncycastle.v170.cert.ocsp.OCSPReq request,
String responderURL) |
void |
setSigningData(String signingAlg,
PrivateKey signingKey,
X509Certificate[] signingChain,
String signingProvider)
Set data used to sign the OCSP requests.
|
void |
setUseNonceExtension(boolean useNonceExtension) |
static void |
validateSingleResponse(lv.eparaksts.org.bouncycastle.v170.cert.ocsp.SingleResp singleResp,
Date validationTime,
X509Certificate cert) |
public OCSPClient(TrustStore trustStore, boolean useResultCache)
useResultCache - true if to use the OCSP result cache.public OCSPClient(TrustStore trustStore, boolean useResultCache, List<lv.eparaksts.org.bouncycastle.v170.cert.ocsp.OCSPResp> ocspStore)
public void setUseNonceExtension(boolean useNonceExtension)
public void setSigningData(String signingAlg, PrivateKey signingKey, X509Certificate[] signingChain, String signingProvider)
signingAlg - signature algorithm.signingKey - signing key.signingChain - signing certificate chain.signingProvider - signature provider.public CertValidatorResult.OCSPResult getOCSPResult(X509Certificate userCert, X509Certificate issuerCert, Date validationTime) throws CertValidatorException
userCert - the user certificate.issuerCert - the issuer certificate.Exception - if certificate status cannot be obtained.CertValidatorExceptionpublic CertValidatorResult.OCSPResult getOCSPResult(Map<BigInteger,X509Certificate> certificateMap, String responderURL, Date validationTime) throws CertValidatorException
certificateMap - map containing certificate identifiers.responderURL - a URL that identifies the location of the OCSP responder.Exception - if certificate status cannot be obtained.CertValidatorExceptionpublic lv.eparaksts.org.bouncycastle.v170.cert.ocsp.OCSPReq generateOCSPRequest(List<lv.eparaksts.org.bouncycastle.v170.cert.ocsp.CertificateID> certificateIDList, byte[] nonce) throws lv.eparaksts.org.bouncycastle.v170.cert.ocsp.OCSPException
lv.eparaksts.org.bouncycastle.v170.cert.ocsp.OCSPExceptionpublic lv.eparaksts.org.bouncycastle.v170.cert.ocsp.OCSPResp sendRequest(lv.eparaksts.org.bouncycastle.v170.cert.ocsp.OCSPReq request,
String responderURL)
throws lv.eparaksts.org.bouncycastle.v170.cert.ocsp.OCSPException
lv.eparaksts.org.bouncycastle.v170.cert.ocsp.OCSPExceptionpublic String getResponseStatusMessage(int status)
public static byte[] getResponseNonce(lv.eparaksts.org.bouncycastle.v170.cert.ocsp.BasicOCSPResp basicResp)
public static List<lv.eparaksts.org.bouncycastle.v170.cert.ocsp.CertificateID> getCertificateIDList(Map<BigInteger,X509Certificate> certificateMap) throws Exception
Exceptionprotected static boolean idEquals(lv.eparaksts.org.bouncycastle.v170.cert.ocsp.CertificateID id1,
lv.eparaksts.org.bouncycastle.v170.cert.ocsp.CertificateID id2)
public static String resolveOCSPResponderURL(X509Certificate userCert, X509Certificate issuerCert) throws CertValidatorException
CertValidatorExceptionpublic static X509Certificate getOCSPResponderCert(lv.eparaksts.org.bouncycastle.v170.cert.ocsp.BasicOCSPResp basicResponse) throws Exception
Exceptionpublic static X509Certificate resolveOCSPResponderCert(TrustStore trustStore, lv.eparaksts.org.bouncycastle.v170.cert.ocsp.BasicOCSPResp basicResponse) throws Exception
Exceptionpublic static void validateSingleResponse(lv.eparaksts.org.bouncycastle.v170.cert.ocsp.SingleResp singleResp,
Date validationTime,
X509Certificate cert)
throws CertValidatorException
CertValidatorException