Package eu.europa.esig.dss.service.crl
Class OnlineCRLSource
- java.lang.Object
-
- eu.europa.esig.dss.service.crl.OnlineCRLSource
-
- All Implemented Interfaces:
CRLSource,OnlineRevocationSource<CRLToken>,RevocationSource<CRLToken>,RevocationSourceAlternateUrlsSupport<CRLToken>,Serializable
public class OnlineCRLSource extends Object implements CRLSource, RevocationSourceAlternateUrlsSupport<CRLToken>, OnlineRevocationSource<CRLToken>
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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description OnlineCRLSource()The default constructor.OnlineCRLSource(DataLoader dataLoader)This constructor allows to set a specificDataLoader.
-
Method Summary
Modifier and Type Method Description CRLTokengetRevocationToken(CertificateToken certificateToken, CertificateToken issuerCertificateToken)This method retrieves aRevocationTokenfor the certificateTokenCRLTokengetRevocationToken(CertificateToken certificateToken, CertificateToken issuerToken, List<String> alternativeUrls)Gets anRevocationTokenfor the given certificate / issuer's certificate couple.voidsetDataLoader(DataLoader dataLoader)Set the DataLoader to use for querying a revocation server.voidsetPreferredProtocol(Protocol preferredProtocol)This method allows to set the preferred protocol.
-
-
-
Constructor Detail
-
OnlineCRLSource
public OnlineCRLSource()
The default constructor. ACommonsDataLoader is created.
-
OnlineCRLSource
public OnlineCRLSource(DataLoader dataLoader)
This constructor allows to set a specificDataLoader.- Parameters:
dataLoader- the component that allows to retrieve the data using any protocol: HTTP, HTTPS, FTP, LDAP.
-
-
Method Detail
-
setPreferredProtocol
public void setPreferredProtocol(Protocol preferredProtocol)
This method allows to set the preferred protocol. This parameter is used used when retrieving the CRL to choose the canal.
Possible values are: http, ldap, ftp- Parameters:
preferredProtocol-Protocolthat is used first to retrieve the revocation data
-
setDataLoader
public void setDataLoader(DataLoader dataLoader)
Description copied from interface:OnlineRevocationSourceSet the DataLoader to use for querying a revocation server.- Specified by:
setDataLoaderin interfaceOnlineRevocationSource<CRLToken>- Parameters:
dataLoader- the component that allows to retrieve a revocation response using HTTP.
-
getRevocationToken
public CRLToken getRevocationToken(CertificateToken certificateToken, CertificateToken issuerCertificateToken)
Description copied from interface:RevocationSourceThis method retrieves aRevocationTokenfor the certificateToken- Specified by:
getRevocationTokenin interfaceRevocationSource<CRLToken>- Parameters:
certificateToken- TheCertificateTokenfor which the request is madeissuerCertificateToken- TheCertificateTokenwhich is the issuer of the certificateToken- Returns:
- an instance of
RevocationToken
-
getRevocationToken
public CRLToken getRevocationToken(CertificateToken certificateToken, CertificateToken issuerToken, List<String> alternativeUrls)
Description copied from interface:RevocationSourceAlternateUrlsSupportGets anRevocationTokenfor the given certificate / issuer's certificate couple. The coherence between the response and the request is checked.- Specified by:
getRevocationTokenin interfaceRevocationSourceAlternateUrlsSupport<CRLToken>- Parameters:
certificateToken- TheCertificateTokenfor which the request is madeissuerToken- TheCertificateTokenwhich is the issuer of the certificateTokenalternativeUrls- The list of alternative urls to call- Returns:
RevocationTokencontaining information about the validity of the cert
-
-