eu.emi.security.authn.x509.helpers.ocsp
public class OCSPCachingClient extends Object
OCSPClientImpl
.
This class is thread safe.Constructor and Description |
---|
OCSPCachingClient(long maxTtl,
File diskPath,
String prefix) |
Modifier and Type | Method and Description |
---|---|
void |
clearMemoryCache() |
OCSPResult |
queryForCertificate(URL responder,
X509Certificate toCheckCert,
X509Certificate issuerCert,
X509Credential requester,
boolean addNonce,
int timeout)
Returns the checked certificate status.
|
OCSPResult |
queryForCertificate(URL responder,
X509Certificate toCheckCert,
X509Certificate issuerCert,
X509Credential requester,
boolean addNonce,
int timeout,
OCSPClientImpl client)
Returns the checked certificate status, using a custom client.
|
public OCSPCachingClient(long maxTtl, File diskPath, String prefix)
maxTtl
- maximum time after each cached response expires. Negative for no cache at all, 0 for no limit
(i.e. caching time will be only controlled by the OCSP response validity period). In ms.diskPath
- if not null, cached responses will be stored on disk.prefix
- used if disk cache is enabled, as a common prefix for all files created in the cache directory.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 OCSPResult queryForCertificate(URL responder, X509Certificate toCheckCert, X509Certificate issuerCert, X509Credential requester, boolean addNonce, int timeout, OCSPClientImpl client) 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 responseclient
- client to be used for network callsOCSPException
IOException
public void clearMemoryCache()
Copyright © 2012-2013 European Middleware Initiative. All Rights Reserved.