public class OcspResponseUtil
extends java.lang.Object
| Constructor and Description |
|---|
OcspResponseUtil() |
| Modifier and Type | Method and Description |
|---|---|
static iaik.x509.ocsp.OCSPResponse |
createOcspResponse(java.security.cert.X509Certificate checkCert,
java.security.cert.X509Certificate issuerCert,
java.lang.String ocspUrl)
Sends a OCSP request and evaluates and returns the received OCSP response.
|
static iaik.x509.ocsp.OCSPResponse |
createOcspResponse(java.security.cert.X509Certificate checkCert,
java.security.cert.X509Certificate issuerCert,
java.lang.String ocspUrl,
java.security.PrivateKey requestorKey,
java.security.cert.X509Certificate[] requestorCerts)
Sends a OCSP request and evaluates and returns the received OCSP response.
|
static iaik.x509.ocsp.CertStatus |
getOCSPResponseCertStatus(iaik.x509.ocsp.OCSPResponse ocspResponse,
java.security.cert.X509Certificate checkCert,
java.security.cert.X509Certificate issuerCert,
byte[] nonce)
Parses an OCSP response and returns the certificate status.
|
static java.lang.String |
getOcspUrl(iaik.x509.X509Certificate certificate)
Extract URL to be used for checking revocation status via OCSP.
|
public static iaik.x509.ocsp.OCSPResponse createOcspResponse(java.security.cert.X509Certificate checkCert,
java.security.cert.X509Certificate issuerCert,
java.lang.String ocspUrl)
throws CmsCadesException
checkCert - the certificate to checkissuerCert - the certificate of the issuer of checkCertocspUrl - the URL to the OCSP responder for checking the certificate statusCmsCadesException - if OCSP request could not be created or sent, or if OCSP response could not be
verifiedpublic static iaik.x509.ocsp.OCSPResponse createOcspResponse(java.security.cert.X509Certificate checkCert,
java.security.cert.X509Certificate issuerCert,
java.lang.String ocspUrl,
java.security.PrivateKey requestorKey,
java.security.cert.X509Certificate[] requestorCerts)
throws CmsCadesException
checkCert - the certificate to checkissuerCert - the certificate of the issuer of checkCertocspUrl - the URL to the OCSP responder for checking the certificate statusrequestorKey - key to be used for signing the OCSP requestrequestorCerts - requestor's certificate chainCmsCadesException - if OCSP request could not be created or sent, or if OCSP response could not be
verifiedpublic static iaik.x509.ocsp.CertStatus getOCSPResponseCertStatus(iaik.x509.ocsp.OCSPResponse ocspResponse,
java.security.cert.X509Certificate checkCert,
java.security.cert.X509Certificate issuerCert,
byte[] nonce)
throws CmsCadesException
ocspResponse - OCSP response to be validatedcheckCert - the certificate to be checkedissuerCert - the certificate of the issuer of checkCertnonce - the nonce of the corresponding OCSP request (or null if not available)CmsCadesException - if response is not valid or errors occurred during OCSP response verificationpublic static java.lang.String getOcspUrl(iaik.x509.X509Certificate certificate)
throws java.security.GeneralSecurityException
certificate - certificate to extract the URL fromjava.security.GeneralSecurityException - if the URL can't be extracted