public class OcspHelper extends Object
|Constructor and Description|
|Modifier and Type||Method and Description|
Get responder certificate.
Performs and verifies the OCSP-Request
Helper method to verify response status.
public OcspHelper(X509Certificate checkCertificate, Date signDate, X509Certificate issuerCertificate, Set<X509Certificate> additionalCerts, String ocspUrl)
checkCertificate- Certificate to be OCSP-checked
signDate- the date when the signing took place
issuerCertificate- Certificate of the issuer
additionalCerts- 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 OCSP
public org.bouncycastle.cert.ocsp.OCSPResp getResponseOcsp() throws 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 response
org.bouncycastle.cert.ocsp.OCSPException- if the response status is not ok
Copyright © 2002–2018 The Apache Software Foundation. All rights reserved.