public class SingleFileLotlService extends LotlService
You should use this service if you have only a country specific LOTL file with certificates you trust.
First, you create an instance of CountrySpecificLotl and then pass it to the constructor of
SingleFileLotlService together with fetching properties and the certificates to validate LOTL file.
Then this instance can be passed to ValidatorChainBuilder.withLotlService(java.util.function.Supplier<com.itextpdf.signatures.validation.lotl.LotlService>)
so that the certificates from the LOTL file are used for signature validation.
lotlFetchingProperties| Constructor and Description |
|---|
SingleFileLotlService(LotlFetchingProperties lotlFetchingProperties,
CountrySpecificLotl countrySpecificLotl,
List<String> certificates)
Creates a new instance of
SingleFileLotlService. |
| Modifier and Type | Method and Description |
|---|---|
List<IServiceContext> |
getNationalTrustedCertificates()
Retrieves national trusted certificates.
|
ValidationReport |
getValidationResult()
Get the validation results for the List of Trusted Lists (LOTL).
|
void |
loadFromCache(InputStream in)
Loads the cache from the provided input stream.
|
protected void |
loadFromNetwork()
Loads the cache from the network by fetching the latest LOTL data and related resources.
|
void |
serializeCache(OutputStream outputStream)
Serializes the current state of the cache to the provided output stream.
|
cancelTimer, close, getGlobalService, initializeCache, initializeCache, initializeGlobalCache, setupTimer, tryAndRefreshCache, withCountrySpecificLotlFetcher, withCustomResourceRetriever, withEuropeanLotlFetcher, withEuropeanResourceFetcher, withLotlServiceCache, withLotlValidator, withPivotFetcher, withXmlSignatureValidatorpublic SingleFileLotlService(LotlFetchingProperties lotlFetchingProperties, CountrySpecificLotl countrySpecificLotl, List<String> certificates)
SingleFileLotlService.lotlFetchingProperties - LotlFetchingProperties to configure the way in which LOTL will be fetchedcountrySpecificLotl - CountrySpecificLotl for a LOTL file to servecertificates - a list of certificates to validate LOTL filepublic void loadFromCache(InputStream in)
The input stream should contain serialized cache data, which can be created using the
LotlService.serializeCache(OutputStream) method.
loadFromCache in class LotlServicein - the input stream to read the cached data frompublic void serializeCache(OutputStream outputStream) throws IOException
serializeCache in class LotlServiceoutputStream - the output stream to which the cache will be serializedIOException - if an I/O error occurs during serializationpublic ValidationReport getValidationResult()
getValidationResult in class LotlServiceValidationReport containing the results of the LOTL validationpublic List<IServiceContext> getNationalTrustedCertificates()
getNationalTrustedCertificates in class LotlServiceprotected void loadFromNetwork()
This method fetches the main LOTL file, EU journal certificates, pivot files, and country-specific LOTLs, validates them, and stores them in the cache.
Note: This method is called during cache initialization and should not be called directly in normal operation.
loadFromNetwork in class LotlServiceCopyright © 1998–2026 Apryse Group NV. All rights reserved.