public class OCSPVerifier extends Object implements RevocationVerifier
| Constructor and Description |
|---|
OCSPVerifier(OCSPCache cache) |
| Modifier and Type | Method and Description |
|---|---|
RevocationStatus |
checkRevocationStatus(X509Certificate peerCert,
X509Certificate issuerCert)
Gets the revocation status (Good, Revoked or Unknown) of the given peer certificate.
|
static org.bouncycastle.cert.ocsp.OCSPReq |
generateOCSPRequest(X509Certificate issuerCert,
BigInteger serialNumber)
This method generates an OCSP Request to be sent to an OCSP authority access endpoint.
|
static List<String> |
getAIALocations(X509Certificate cert)
Authority Information Access (AIA) is a non-critical extension in an X509 Certificate.
|
static org.bouncycastle.cert.ocsp.OCSPResp |
getOCSPResponce(String serviceUrl,
org.bouncycastle.cert.ocsp.OCSPReq request)
Gets an ASN.1 encoded OCSP response (as defined in RFC 2560) from the given service URL.
|
public OCSPVerifier(OCSPCache cache)
public RevocationStatus checkRevocationStatus(X509Certificate peerCert, X509Certificate issuerCert) throws CertificateVerificationException
checkRevocationStatus in interface RevocationVerifierpeerCert - The certificate that needs to be validated.issuerCert - Needs to create OCSP request.CertificateVerificationException - Occurs when it fails to verify the ocsp status of certificate.public static org.bouncycastle.cert.ocsp.OCSPResp getOCSPResponce(String serviceUrl, org.bouncycastle.cert.ocsp.OCSPReq request) throws CertificateVerificationException
serviceUrl - URL of the OCSP endpoint.request - An OCSP request object.CertificateVerificationException - if any error occurs while trying to get a response from the CA.public static org.bouncycastle.cert.ocsp.OCSPReq generateOCSPRequest(X509Certificate issuerCert, BigInteger serialNumber) throws CertificateVerificationException
issuerCert - the Issuer's certificate of the peer certificate we are interested in.serialNumber - of the peer certificate.CertificateVerificationException - if any error occurs while generating ocsp request.public static List<String> getAIALocations(X509Certificate cert) throws CertificateVerificationException
cert - is the certificateCertificateVerificationException - if any error occurs while retrieving authority access points from the
certificate.Copyright © 2023 WSO2. All rights reserved.