eu.emi.security.authn.x509.helpers.ocsp
public class OCSPClientImpl extends Object
It is implementing the RFC 2560 also taking care to support the lighweight profile recommendations defined in the RFC 5019.
Constructor and Description |
---|
OCSPClientImpl() |
Modifier and Type | Method and Description |
---|---|
OCSPReq |
createRequest(X509Certificate toCheckCert,
X509Certificate issuerCert,
X509Credential requester,
boolean addNonce) |
static byte[] |
extractNonce(OCSPReq request) |
static Date |
getNextUpdateFromCacheHeader(String cc) |
OCSPResult |
queryForCertificate(URL responder,
X509Certificate toCheckCert,
X509Certificate issuerCert,
X509Credential requester,
boolean addNonce,
int timeout)
Returns a verified single response, related to the checked certificate.
|
OCSPResponseStructure |
send(URL responder,
OCSPReq requestO,
int timeout) |
SingleResp |
verifyResponse(OCSPResp response,
X509Certificate toCheckCert,
X509Certificate issuerCert,
byte[] checkNonce)
Verifies the provided response
|
public OCSPResult queryForCertificate(URL responder, X509Certificate toCheckCert, X509Certificate issuerCert, X509Credential requester, boolean addNonce, int timeout) throws IOException, OCSPException
responder
- mandatory - URL of the responder. HTTP or HTTPs, however in https mode thetoCheckCert
- mandatory certificate to be checkedissuerCert
- mandatory certificate of the toCheckCert issuerrequester
- if not null, then it is assumed that request must be signed by the requester.addNonce
- if true nonce will be added to the request and required in responseOCSPException
IOException
public OCSPReq createRequest(X509Certificate toCheckCert, X509Certificate issuerCert, X509Credential requester, boolean addNonce) throws OCSPException
OCSPException
public OCSPResponseStructure send(URL responder, OCSPReq requestO, int timeout) throws IOException
IOException
public SingleResp verifyResponse(OCSPResp response, X509Certificate toCheckCert, X509Certificate issuerCert, byte[] checkNonce) throws OCSPException
response
- toCheckCert
- issuerCert
- checkNonce
- OCSPException
public static byte[] extractNonce(OCSPReq request)
Copyright © 2012-2013 European Middleware Initiative. All Rights Reserved.