Package eu.europa.esig.dss.service.ocsp
Class FileCacheOCSPSource
java.lang.Object
eu.europa.esig.dss.spi.x509.revocation.RepositoryRevocationSource<OCSP>
eu.europa.esig.dss.spi.x509.revocation.FileRevocationSource<OCSP>
eu.europa.esig.dss.service.ocsp.FileCacheOCSPSource
- All Implemented Interfaces:
MultipleRevocationSource<OCSP>,OCSPSource,RevocationSource<OCSP>,Serializable
OCSPSource that stores its OCSP responses on the file system.
WARNING: The class represents an experimental functionality and included in the DSS version 6.3. Please note the class was not extensively tested.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class eu.europa.esig.dss.spi.x509.revocation.FileRevocationSource
FileRevocationSource.FileCacheEntry -
Field Summary
Fields inherited from class eu.europa.esig.dss.spi.x509.revocation.RepositoryRevocationSource
proxiedSource -
Constructor Summary
ConstructorsConstructorDescriptionEmpty constructor.FileCacheOCSPSource(OCSPSource proxiedSource) Constructor that initializes the file cache OCSP source with a proxiedOCSPSource provided. -
Method Summary
Modifier and TypeMethodDescriptiongetRevocationAccessUrls(CertificateToken certificateToken) Returns a revocation access URLs of the given revocation type for the providedCertificateTokenprotected StringGets the file extension used for cached revocation files.getRevocationToken(CertificateToken certificateToken, CertificateToken issuerCertificateToken) This method retrieves aRevocationTokenfor the certificateTokengetRevocationToken(CertificateToken certificateToken, CertificateToken issuerCertificateToken, boolean forceRefresh) Retrieves a revocation token for the givenCertificateTokenprotected StringgetRevocationTokenKey(CertificateToken certificateToken, String revocationAccessUrl) Gets a unique revocation token identifier used to store the revocation token for thiscertificateTokenwithin a repositoryinitRevocationTokenKeys(CertificateToken certificateToken) Initialize a list of revocation token keysStringfrom the givenCertificateTokenprotected OCSPTokenreconstructTokenFromEncodedData(FileRevocationSource<OCSP>.FileCacheEntry revocationCache, CertificateToken certificateToken, CertificateToken issuerCertToken) Creates a revocation token from cached encoded dataMethods inherited from class eu.europa.esig.dss.spi.x509.revocation.FileRevocationSource
clearCache, deleteCacheFile, findRevocations, getFileCacheDirectory, insertRevocation, removeRevocation, saveRevocationToken, setFileCacheDirectory, updateRevocationMethods inherited from class eu.europa.esig.dss.spi.x509.revocation.RepositoryRevocationSource
getRevocationSourceUrl, getRevocationTokens, getRevocationTokens, isNotExpired, setDefaultNextUpdateDelay, setMaxNextUpdateDelay, setProxySource, setRemoveExpired
-
Constructor Details
-
FileCacheOCSPSource
public FileCacheOCSPSource()Empty constructor. The proxied OCSPSource can be provided using the#setProxySourcemethod. -
FileCacheOCSPSource
Constructor that initializes the file cache OCSP source with a proxiedOCSPSource provided.- Parameters:
proxiedSource-OCSPSourceto be used to load OCSP when the corresponding revocation document is not available in the file system.
-
-
Method Details
-
reconstructTokenFromEncodedData
protected OCSPToken reconstructTokenFromEncodedData(FileRevocationSource<OCSP>.FileCacheEntry revocationCache, CertificateToken certificateToken, CertificateToken issuerCertToken) Description copied from class:FileRevocationSourceCreates a revocation token from cached encoded data- Specified by:
reconstructTokenFromEncodedDatain classFileRevocationSource<OCSP>- Parameters:
revocationCache-FileRevocationSource<R extends Revocation>.FileCacheEntrythe cached revocation data entrycertificateToken-CertificateTokenthe certificate tokenissuerCertToken-CertificateTokenthe issuer certificate token- Returns:
- the revocation token or null if creation fails
-
getRevocationFileExtension
Description copied from class:FileRevocationSourceGets the file extension used for cached revocation files.- Specified by:
getRevocationFileExtensionin classFileRevocationSource<OCSP>- Returns:
- the file extension (e.g., ".crl" or ".ocsp")
-
getRevocationTokenKey
protected String getRevocationTokenKey(CertificateToken certificateToken, String revocationAccessUrl) Description copied from class:RepositoryRevocationSourceGets a unique revocation token identifier used to store the revocation token for thiscertificateTokenwithin a repository- Specified by:
getRevocationTokenKeyin classRepositoryRevocationSource<OCSP>- Parameters:
certificateToken-CertificateTokenrevocationAccessUrl-Stringrepresenting a URL used to download the revocation token from- Returns:
Stringrevocation token key
-
getRevocationAccessUrls
Description copied from class:RepositoryRevocationSourceReturns a revocation access URLs of the given revocation type for the providedCertificateToken- Specified by:
getRevocationAccessUrlsin classRepositoryRevocationSource<OCSP>- Parameters:
certificateToken-CertificateTokento get revocation URLs for- Returns:
- a list of
StringURLs
-
initRevocationTokenKeys
Description copied from class:RepositoryRevocationSourceInitialize a list of revocation token keysStringfrom the givenCertificateToken- Specified by:
initRevocationTokenKeysin classRepositoryRevocationSource<OCSP>- Parameters:
certificateToken-CertificateToken- Returns:
- list of
Stringrevocation keys
-
getRevocationToken
public OCSPToken getRevocationToken(CertificateToken certificateToken, CertificateToken issuerCertificateToken, boolean forceRefresh) Description copied from class:RepositoryRevocationSourceRetrieves a revocation token for the givenCertificateToken- Overrides:
getRevocationTokenin classRepositoryRevocationSource<OCSP>- Parameters:
certificateToken-CertificateTokenissuerCertificateToken-CertificateTokenof the issuer of certificateTokenforceRefresh- if true, explicitly skips the cache- Returns:
RevocationToken
-
getRevocationToken
public OCSPToken getRevocationToken(CertificateToken certificateToken, CertificateToken issuerCertificateToken) Description copied from interface:RevocationSourceThis method retrieves aRevocationTokenfor the certificateToken- Specified by:
getRevocationTokenin interfaceOCSPSource- Specified by:
getRevocationTokenin interfaceRevocationSource<OCSP>- Overrides:
getRevocationTokenin classRepositoryRevocationSource<OCSP>- Parameters:
certificateToken- TheCertificateTokenfor which the request is madeissuerCertificateToken- TheCertificateTokenwhich is the issuer of the certificateToken- Returns:
- an instance of
RevocationToken
-