Package eu.europa.esig.dss.validation
Class RevocationDataLoadingStrategy
java.lang.Object
eu.europa.esig.dss.validation.RevocationDataLoadingStrategy
- Direct Known Subclasses:
CRLFirstRevocationDataLoadingStrategy
,OCSPFirstRevocationDataLoadingStrategy
This class allows retrieving of Revocation data from CRL or OCSP sources, based on the defined strategy
NOTE: The implemented object does not require setting of OCSP/CRL/RevocationDataVerifier sources
on instantiation from the user.
All the values are automatically configured and set in
eu.europa.esig.dss.validation.SignatureValidationContext
based on the parameters defined in the provided eu.europa.esig.dss.validation.CertificateVerifier
-
Field Summary
Modifier and TypeFieldDescriptionprotected RevocationSource<CRL>
The CRL revocation sourceprotected boolean
When enabled, returns first obtained revocation token, if both OCSP and CRL requests failedprotected RevocationSource<OCSP>
The OCSP revocation sourceprotected RevocationDataVerifier
Used to verify the validity of obtained revocation data -
Constructor Summary
ModifierConstructorDescriptionprotected
Default constructor instantiating object with null values -
Method Summary
Modifier and TypeMethodDescriptionprotected RevocationToken<CRL>
checkCRL
(CertificateToken certificateToken, CertificateToken issuerToken) Retrieves and verifies the obtained CRL token NOTE: returns only if a valid entry has been obtained!protected RevocationToken<OCSP>
checkOCSP
(CertificateToken certificateToken, CertificateToken issuerToken) Retrieves and verifies the obtained OCSP token NOTE: returns only if a valid entry has been obtained!abstract RevocationToken
getRevocationToken
(CertificateToken certificateToken, CertificateToken issuerCertificateToken) This method retrieves aRevocationToken
for the given certificateTokenprotected boolean
isAcceptableToken
(RevocationToken<?> revocationToken) This method verifies whether the obtained revocation token is acceptable
-
Field Details
-
crlSource
The CRL revocation source -
ocspSource
The OCSP revocation source -
revocationDataVerifier
Used to verify the validity of obtained revocation data -
fallbackEnabled
protected boolean fallbackEnabledWhen enabled, returns first obtained revocation token, if both OCSP and CRL requests failed
-
-
Constructor Details
-
RevocationDataLoadingStrategy
protected RevocationDataLoadingStrategy()Default constructor instantiating object with null values
-
-
Method Details
-
getRevocationToken
public abstract RevocationToken getRevocationToken(CertificateToken certificateToken, CertificateToken issuerCertificateToken) This method retrieves aRevocationToken
for the given certificateToken- Parameters:
certificateToken
- TheCertificateToken
for which the request is madeissuerCertificateToken
- TheCertificateToken
which is the issuer of the certificateToken- Returns:
- an instance of
RevocationToken
-
checkCRL
protected RevocationToken<CRL> checkCRL(CertificateToken certificateToken, CertificateToken issuerToken) Retrieves and verifies the obtained CRL token NOTE: returns only if a valid entry has been obtained!- Parameters:
certificateToken
-CertificateToken
to get CRL forissuerToken
-CertificateToken
issuer ofcertificateToken
- Returns:
RevocationToken
-
checkOCSP
protected RevocationToken<OCSP> checkOCSP(CertificateToken certificateToken, CertificateToken issuerToken) Retrieves and verifies the obtained OCSP token NOTE: returns only if a valid entry has been obtained!- Parameters:
certificateToken
-CertificateToken
to get OCSP forissuerToken
-CertificateToken
issuer ofcertificateToken
- Returns:
RevocationToken
-
isAcceptableToken
This method verifies whether the obtained revocation token is acceptable- Parameters:
revocationToken
-RevocationToken
to be checked- Returns:
- TRUE if the token is acceptable and can be returned, FALSE otherwise
-