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)
  • Constructor Details

    • DefaultRevocationDataConnector

      public DefaultRevocationDataConnector()
  • Method Details

    • downloadCrl

      public byte[] downloadCrl(String url, int connectTimeout, int readTimeout) throws IOException
      Download CRL data
      Specified by:
      downloadCrl in interface CRLDataLoader
      Parameters:
      url - URL from which the CRL is to be downloaded
      connectTimeout - timeout in milliseconds for connecting to the CRL source
      readTimeout - 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 interface OCSPDataLoader
      Parameters:
      url - OCSP request URL
      ocspReq - OCSP request to send to the OCSP responder
      connectTimeout - max time in milliseconds allowed for an HTTP connect
      readTimeout - max time in milliseconds allowed for reading the referenced data object
      Returns:
      OCSP Response
      Throws:
      IOException - Error sending or receiving data