public class OcspHelper extends Object
Constructor and Description |
---|
OcspHelper(X509Certificate checkCertificate,
Date signDate,
X509Certificate issuerCertificate,
Set<X509Certificate> additionalCerts,
String ocspUrl) |
Modifier and Type | Method and Description |
---|---|
X509Certificate |
getOcspResponderCertificate()
Get responder certificate.
|
org.bouncycastle.cert.ocsp.OCSPResp |
getResponseOcsp()
Performs and verifies the OCSP-Request
|
void |
verifyRespStatus(org.bouncycastle.cert.ocsp.OCSPResp resp)
Helper method to verify response status.
|
public OcspHelper(X509Certificate checkCertificate, Date signDate, X509Certificate issuerCertificate, Set<X509Certificate> additionalCerts, String ocspUrl)
checkCertificate
- Certificate to be OCSP-checkedsignDate
- the date when the signing took placeissuerCertificate
- Certificate of the issueradditionalCerts
- Set of trusted root CA certificates that will be used as "trust
anchors" and intermediate CA certificates that will be used as part of the certification
chain. All self-signed certificates are considered to be trusted root CA certificates. All
the rest are considered to be intermediate CA certificates.ocspUrl
- where to fetch for OCSPpublic org.bouncycastle.cert.ocsp.OCSPResp getResponseOcsp() throws IOException, org.bouncycastle.cert.ocsp.OCSPException, RevokedCertificateException
IOException
org.bouncycastle.cert.ocsp.OCSPException
RevokedCertificateException
public X509Certificate getOcspResponderCertificate()
getResponseOcsp()
has been called.public void verifyRespStatus(org.bouncycastle.cert.ocsp.OCSPResp resp) throws org.bouncycastle.cert.ocsp.OCSPException
resp
- OCSP responseorg.bouncycastle.cert.ocsp.OCSPException
- if the response status is not okCopyright © 2002–2018 The Apache Software Foundation. All rights reserved.