Interface IOnFailingCountryLotlData
- All Known Implementing Classes:
-
RemoveOnFailingCountryData
,ThrowExceptionOnFailingCountryData
This strategy is used for the handling of the cases where the connection to the third-party endpoint for fetching the trusted list for a specific country fails. This can happen for various reasons, such as network issues, server downtime, or invalid responses. This strategy will be called per each country-specific EU trusted list that is not available on initialization or when the certificates staleness threshold is reached at the moment of digital signatures validation attempt if it relies on EU trusted lists. See LotlFetchingProperties.setCacheStalenessInMilliseconds(long)
for details about the staleness threshold.
We provide 2 default implementations out of the box:
- ThrowExceptionOnFailingCountryData
- which will throw an exception if the fetching of a country-specific trusted list fails. In cache initialization this means that initialization will be halted. In cache update this means that unavailable country-specific trusted certificates will not be updated, the validation will continue until the certificate staleness threshold will be reached, but when staleness threshold is reached this strategy will cause the validation attempts to fail with exception if they rely on EU trusted lists.
- RemoveOnFailingCountryData
- which just silently removes not available country-specific certificates from the trust store, thus the validation results might change depending on success of certificates fetching. In cache initialization this means that the country-specific trusted certificates will not be added to the trust store. In cache update this means that unavailable country-specific trusted certificates will not be updated, the validation process will continue until the certificate staleness threshold will be reached, but when the staleness threshold is reached this strategy will silently remove the outdated certificates.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
onCountryFailure
(CountrySpecificLotlFetcher.Result fetchResult) This method is called when the fetching of a country-specific Lotl fails.
-
Method Details
-
onCountryFailure
This method is called when the fetching of a country-specific Lotl fails. It allows for custom handling of the failure.If the implementation does not throw an exception, the validation process will continue, and the certificates from the
CountrySpecificLotlFetcher.Result
will not be added to the trust store.- Parameters:
-
fetchResult
- the result of the fetch attempt, which may contain error details
-