public class OCSPVerifier extends RootStoreVerifier
| Modifier and Type | Field and Description |
|---|---|
protected static Logger |
LOGGER
The Logger instance
|
protected java.util.List<org.bouncycastle.cert.ocsp.BasicOCSPResp> |
ocsps
The list of OCSP responses.
|
rootStoreonlineCheckingAllowed, verifier| Constructor and Description |
|---|
OCSPVerifier(CertificateVerifier verifier,
java.util.List<org.bouncycastle.cert.ocsp.BasicOCSPResp> ocsps)
Creates an OCSPVerifier instance.
|
| Modifier and Type | Method and Description |
|---|---|
org.bouncycastle.cert.ocsp.BasicOCSPResp |
getOcspResponse(java.security.cert.X509Certificate signCert,
java.security.cert.X509Certificate issuerCert)
Gets an OCSP response online and returns it if the status is GOOD
(without further checking).
|
boolean |
isSignatureValid(org.bouncycastle.cert.ocsp.BasicOCSPResp ocspResp,
java.security.cert.Certificate responderCert)
Checks if an OCSP response is genuine
|
void |
isValidResponse(org.bouncycastle.cert.ocsp.BasicOCSPResp ocspResp,
java.security.cert.X509Certificate issuerCert)
Verifies if an OCSP response is genuine
|
boolean |
verify(org.bouncycastle.cert.ocsp.BasicOCSPResp ocspResp,
java.security.cert.X509Certificate signCert,
java.security.cert.X509Certificate issuerCert,
java.util.Date signDate)
Verifies a certificate against a single OCSP response
|
java.util.List<VerificationOK> |
verify(java.security.cert.X509Certificate signCert,
java.security.cert.X509Certificate issuerCert,
java.util.Date signDate)
Verifies if a a valid OCSP response is found for the certificate.
|
boolean |
verifyResponse(org.bouncycastle.cert.ocsp.BasicOCSPResp ocspResp,
java.security.cert.X509Certificate responderCert)
Verifies if the signature of the response is valid.
|
setRootStoresetOnlineCheckingAllowedprotected static final Logger LOGGER
protected java.util.List<org.bouncycastle.cert.ocsp.BasicOCSPResp> ocsps
public OCSPVerifier(CertificateVerifier verifier, java.util.List<org.bouncycastle.cert.ocsp.BasicOCSPResp> ocsps)
verifier - the next verifier in the chainocsps - a list of OCSP responsespublic java.util.List<VerificationOK> verify(java.security.cert.X509Certificate signCert, java.security.cert.X509Certificate issuerCert, java.util.Date signDate) throws java.security.GeneralSecurityException, java.io.IOException
verify in class RootStoreVerifiersignCert - the certificate that needs to be checkedissuerCert - its issuersignDate - the date the certificate needs to be validVerificationOK objects.
The list will be empty if the certificate couldn't be verified.java.security.GeneralSecurityExceptionjava.io.IOExceptionRootStoreVerifier.verify(java.security.cert.X509Certificate, java.security.cert.X509Certificate, java.util.Date)public boolean verify(org.bouncycastle.cert.ocsp.BasicOCSPResp ocspResp,
java.security.cert.X509Certificate signCert,
java.security.cert.X509Certificate issuerCert,
java.util.Date signDate)
throws java.security.GeneralSecurityException,
java.io.IOException
ocspResp - the OCSP responseserialNumber - the serial number of the certificate that needs to be checkedissuerCert - signDate - java.security.GeneralSecurityExceptionjava.io.IOExceptionpublic void isValidResponse(org.bouncycastle.cert.ocsp.BasicOCSPResp ocspResp,
java.security.cert.X509Certificate issuerCert)
throws java.security.GeneralSecurityException,
java.io.IOException
ocspResp - the OCSP responseissuerCert - the issuer certificatejava.security.GeneralSecurityExceptionjava.io.IOExceptionpublic boolean verifyResponse(org.bouncycastle.cert.ocsp.BasicOCSPResp ocspResp,
java.security.cert.X509Certificate responderCert)
ocspResp - the response objectresponderCert - the certificate that may be used to sign the responsepublic boolean isSignatureValid(org.bouncycastle.cert.ocsp.BasicOCSPResp ocspResp,
java.security.cert.Certificate responderCert)
ocspResp - the OCSP responseresponderCert - the responder certificatepublic org.bouncycastle.cert.ocsp.BasicOCSPResp getOcspResponse(java.security.cert.X509Certificate signCert,
java.security.cert.X509Certificate issuerCert)
signCert - the signing certificateissuerCert - the issuer certificateCopyright © 2013. All Rights Reserved.