Class OnlineCRLSource

java.lang.Object
eu.europa.esig.dss.service.crl.OnlineCRLSource
All Implemented Interfaces:
eu.europa.esig.dss.spi.x509.revocation.crl.CRLSource, eu.europa.esig.dss.spi.x509.revocation.RevocationSource<eu.europa.esig.dss.model.x509.revocation.crl.CRL>, eu.europa.esig.dss.spi.x509.revocation.RevocationSourceAlternateUrlsSupport<eu.europa.esig.dss.model.x509.revocation.crl.CRL>, Serializable

public class OnlineCRLSource extends Object implements eu.europa.esig.dss.spi.x509.revocation.crl.CRLSource, eu.europa.esig.dss.spi.x509.revocation.RevocationSourceAlternateUrlsSupport<eu.europa.esig.dss.model.x509.revocation.crl.CRL>
Online CRL repository. This CRL repository implementation will download the CRLs from the given CRL URIs. Note that for the HTTP kind of URLs you can provide dedicated data loader. If the data loader is not provided the standard load from URI is provided. For FTP the standard load from URI is provided. For LDAP kind of URLs an internal implementation using apache-ldap-api is provided.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    The default constructor.
    OnlineCRLSource(eu.europa.esig.dss.spi.client.http.DataLoader dataLoader)
    This constructor allows to set a specific DataLoader.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected eu.europa.esig.dss.crl.CRLBinary
    Download a CRL from given location
    protected List<String>
    getCRLAccessURLs(eu.europa.esig.dss.model.x509.CertificateToken certificateToken, List<String> alternativeUrls)
    Extracts a list of CRL distribution point URLs to be used in the provided order to retrieve a CRL
    eu.europa.esig.dss.spi.x509.revocation.crl.CRLToken
    getRevocationToken(eu.europa.esig.dss.model.x509.CertificateToken certificateToken, eu.europa.esig.dss.model.x509.CertificateToken issuerCertificateToken)
     
    eu.europa.esig.dss.spi.x509.revocation.crl.CRLToken
    getRevocationToken(eu.europa.esig.dss.model.x509.CertificateToken certificateToken, eu.europa.esig.dss.model.x509.CertificateToken issuerToken, List<String> alternativeUrls)
     
    void
    setDataLoader(eu.europa.esig.dss.spi.client.http.DataLoader dataLoader)
    Set the DataLoader to use for querying a revocation server.
    void
    setPreferredProtocol(eu.europa.esig.dss.spi.client.http.Protocol preferredProtocol)
    This method allows to set the preferred protocol.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • OnlineCRLSource

      public OnlineCRLSource()
      The default constructor. A CommonsDataLoader is created.
    • OnlineCRLSource

      public OnlineCRLSource(eu.europa.esig.dss.spi.client.http.DataLoader dataLoader)
      This constructor allows to set a specific DataLoader.
      Parameters:
      dataLoader - the component that allows to retrieve the data using any protocol: HTTP, HTTPS, FTP, LDAP.
  • Method Details

    • setPreferredProtocol

      public void setPreferredProtocol(eu.europa.esig.dss.spi.client.http.Protocol preferredProtocol)
      This method allows to set the preferred protocol. This parameter is used when retrieving the CRL to choose the canal.
      Possible values are: http, ldap, ftp
      Parameters:
      preferredProtocol - Protocol that is used first to retrieve the revocation data
    • setDataLoader

      public void setDataLoader(eu.europa.esig.dss.spi.client.http.DataLoader dataLoader)
      Set the DataLoader to use for querying a revocation server.
      Parameters:
      dataLoader - the component that allows to retrieve a CRL response using HTTP.
    • getRevocationToken

      public eu.europa.esig.dss.spi.x509.revocation.crl.CRLToken getRevocationToken(eu.europa.esig.dss.model.x509.CertificateToken certificateToken, eu.europa.esig.dss.model.x509.CertificateToken issuerCertificateToken)
      Specified by:
      getRevocationToken in interface eu.europa.esig.dss.spi.x509.revocation.crl.CRLSource
      Specified by:
      getRevocationToken in interface eu.europa.esig.dss.spi.x509.revocation.RevocationSource<eu.europa.esig.dss.model.x509.revocation.crl.CRL>
    • getRevocationToken

      public eu.europa.esig.dss.spi.x509.revocation.crl.CRLToken getRevocationToken(eu.europa.esig.dss.model.x509.CertificateToken certificateToken, eu.europa.esig.dss.model.x509.CertificateToken issuerToken, List<String> alternativeUrls)
      Specified by:
      getRevocationToken in interface eu.europa.esig.dss.spi.x509.revocation.RevocationSourceAlternateUrlsSupport<eu.europa.esig.dss.model.x509.revocation.crl.CRL>
    • getCRLAccessURLs

      protected List<String> getCRLAccessURLs(eu.europa.esig.dss.model.x509.CertificateToken certificateToken, List<String> alternativeUrls)
      Extracts a list of CRL distribution point URLs to be used in the provided order to retrieve a CRL
      Parameters:
      certificateToken - CertificateToken to retrieve CRL for
      alternativeUrls - a list of String representing alternative URL sources
      Returns:
      a list of String urls
    • executeCRLRequest

      protected eu.europa.esig.dss.crl.CRLBinary executeCRLRequest(String crlUrl)
      Download a CRL from given location
      Parameters:
      crlUrl - String url to download CRL from
      Returns:
      CRLBinary