Class DefaultRevocationDataConnector
java.lang.Object
se.swedenconnect.sigval.cert.validity.http.GenericHttpConnector
se.swedenconnect.sigval.cert.validity.http.DefaultRevocationDataConnector
- All Implemented Interfaces:
CRLDataLoader
,OCSPDataLoader
public class DefaultRevocationDataConnector
extends GenericHttpConnector
implements CRLDataLoader, OCSPDataLoader
Standard Revocation data connector for downloading revocation data resources
- Author:
- Martin Lindström (martin@idsec.se), Stefan Santesson (stefan@idsec.se)
-
Nested Class Summary
Nested classes/interfaces inherited from class se.swedenconnect.sigval.cert.validity.http.GenericHttpConnector
GenericHttpConnector.TrustAllTrustManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
downloadCrl
(String url, int connectTimeout, int readTimeout) Download CRL dataorg.bouncycastle.cert.ocsp.OCSPResp
requestOCSPResponse
(String url, org.bouncycastle.cert.ocsp.OCSPReq ocspReq, int connectTimeout, int readTimeout) Get an OCSP response from theMethods inherited from class se.swedenconnect.sigval.cert.validity.http.GenericHttpConnector
getResource, getResource
-
Constructor Details
-
DefaultRevocationDataConnector
public DefaultRevocationDataConnector()
-
-
Method Details
-
downloadCrl
Download CRL data- Specified by:
downloadCrl
in interfaceCRLDataLoader
- Parameters:
url
- URL from which the CRL is to be downloadedconnectTimeout
- timeout in milliseconds for connecting to the CRL sourcereadTimeout
- timout in milliseconds for reading the CRL data- Returns:
- CRL bytes
- Throws:
IOException
- on errors downloading the CRL
-
requestOCSPResponse
public org.bouncycastle.cert.ocsp.OCSPResp requestOCSPResponse(String url, org.bouncycastle.cert.ocsp.OCSPReq ocspReq, int connectTimeout, int readTimeout) throws IOException Get an OCSP response from the- Specified by:
requestOCSPResponse
in interfaceOCSPDataLoader
- Parameters:
url
- OCSP request URLocspReq
- OCSP request to send to the OCSP responderconnectTimeout
- max time in milliseconds allowed for an HTTP connectreadTimeout
- max time in milliseconds allowed for reading the referenced data object- Returns:
- OCSP Response
- Throws:
IOException
- Error sending or receiving data
-