Package eu.europa.esig.dss.service.ocsp
Class OnlineOCSPSource
- java.lang.Object
-
- eu.europa.esig.dss.service.ocsp.OnlineOCSPSource
-
- All Implemented Interfaces:
OCSPSource,OnlineRevocationSource<OCSPToken>,RevocationSource<OCSPToken>,RevocationSourceAlternateUrlsSupport<OCSPToken>,Serializable
public class OnlineOCSPSource extends Object implements OCSPSource, RevocationSourceAlternateUrlsSupport<OCSPToken>, OnlineRevocationSource<OCSPToken>
Online OCSP repository. This implementation will contact the OCSP Responder to retrieve the OCSP response.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description OnlineOCSPSource()Create an OCSP source The default constructor for OnlineOCSPSource.
-
Method Summary
Modifier and Type Method Description OCSPTokengetRevocationToken(CertificateToken certificateToken, CertificateToken issuerCertificateToken)This method retrieves aRevocationTokenfor the certificateTokenOCSPTokengetRevocationToken(CertificateToken certificateToken, CertificateToken issuerCertificateToken, 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.voidsetNonceSource(NonceSource nonceSource)Set the NonceSource to use for querying the OCSP server.
-
-
-
Method Detail
-
setDataLoader
public void setDataLoader(DataLoader dataLoader)
Description copied from interface:OnlineRevocationSourceSet the DataLoader to use for querying a revocation server.- Specified by:
setDataLoaderin interfaceOnlineRevocationSource<OCSPToken>- Parameters:
dataLoader- the component that allows to retrieve a revocation response using HTTP.
-
setNonceSource
public void setNonceSource(NonceSource nonceSource)
Set the NonceSource to use for querying the OCSP server.- Parameters:
nonceSource- the component that prevents the replay attack.
-
getRevocationToken
public OCSPToken getRevocationToken(CertificateToken certificateToken, CertificateToken issuerCertificateToken)
Description copied from interface:RevocationSourceThis method retrieves aRevocationTokenfor the certificateToken- Specified by:
getRevocationTokenin interfaceRevocationSource<OCSPToken>- Parameters:
certificateToken- TheCertificateTokenfor which the request is madeissuerCertificateToken- TheCertificateTokenwhich is the issuer of the certificateToken- Returns:
- an instance of
RevocationToken
-
getRevocationToken
public OCSPToken getRevocationToken(CertificateToken certificateToken, CertificateToken issuerCertificateToken, 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<OCSPToken>- Parameters:
certificateToken- TheCertificateTokenfor which the request is madeissuerCertificateToken- TheCertificateTokenwhich is the issuer of the certificateTokenalternativeUrls- The list of alternative urls to call- Returns:
RevocationTokencontaining information about the validity of the cert
-
-