Package eu.europa.esig.dss.validation
Class RevocationDataVerifier
java.lang.Object
eu.europa.esig.dss.validation.RevocationDataVerifier
This class is used to verify acceptance of a revocation data for the following validation process,
whether the revocation data has been extracted from a document or obtained from an online source.
The class verifies the consistency of the given revocation information and
applicability of the used cryptographic constraints used to create this token.
NOTE: It is not recommended to use a single instance of
RevocationDataVerifier
within different CertificateVerifier
s, as it may lead to concurrency issues during the execution
in multi-threaded environments.
Please use a new RevocationDataVerifier
per each CertificateVerifier
.-
Field Summary
Modifier and TypeFieldDescriptionprotected Collection<DigestAlgorithm>
A collection of Digest Algorithms to accept from CRL/OCSP responders.protected Map<EncryptionAlgorithm,
Integer> Map of acceptable Encryption Algorithms with a corresponding minimal acceptable key length for each algorithm.protected ListCertificateSource
The trusted certificate source is used to accept trusted OCSPToken's certificate issuers -
Method Summary
Modifier and TypeMethodDescriptionstatic RevocationDataVerifier
This method is used to instantiate a newRevocationDataVerifier
, using the default validation constraints (synchronized with default validation policy).static RevocationDataVerifier
createRevocationDataVerifierFromPolicy
(ValidationPolicy validationPolicy) This method is used to instantiate aRevocationDataVerifier
from a givenValidationPolicy
in order to synchronize the validation constraints at the current validation time.static RevocationDataVerifier
createRevocationDataVerifierFromPolicyWithTime
(ValidationPolicy validationPolicy, Date validationTime) This method is used to instantiate aRevocationDataVerifier
from a givenValidationPolicy
in order to synchronize the validation constraints with a providedvalidationTime
.boolean
isAcceptable
(RevocationToken<?> revocationToken) This method verifies the validity of the givenRevocationToken
using the embedded issuer certificate tokenboolean
isAcceptable
(RevocationToken<?> revocationToken, CertificateToken issuerCertificateToken) This method verifies the validity of the givenRevocationToken
void
setAcceptableDigestAlgorithms
(Collection<DigestAlgorithm> acceptableDigestAlgorithms) Sets a collection of Digest Algorithms for acceptance.void
setAcceptableEncryptionAlgorithmKeyLength
(Map<EncryptionAlgorithm, Integer> acceptableEncryptionAlgorithmKeyLength) Sets a map of acceptable Encryption Algorithms and their corresponding minimal key length values.
-
Field Details
-
trustedListCertificateSource
The trusted certificate source is used to accept trusted OCSPToken's certificate issuers -
acceptableDigestAlgorithms
A collection of Digest Algorithms to accept from CRL/OCSP responders. NOTE : revocation tokens created with digest algorithms other than listed in this collection will be skipped. DEFAULT : collection of algorithms is synchronized with ETSI 119 312 V1.4.2 -
acceptableEncryptionAlgorithmKeyLength
Map of acceptable Encryption Algorithms with a corresponding minimal acceptable key length for each algorithm. NOTE : revocation tokens created with encryption algorithms other than listed in this map or with a key size smaller than defined in the map will be skipped. DEFAULT : collection of algorithms is synchronized with ETSI 119 312 V1.4.2
-
-
Method Details
-
createDefaultRevocationDataVerifier
This method is used to instantiate a newRevocationDataVerifier
, using the default validation constraints (synchronized with default validation policy).- Returns:
RevocationDataVerifier
-
createRevocationDataVerifierFromPolicy
public static RevocationDataVerifier createRevocationDataVerifierFromPolicy(ValidationPolicy validationPolicy) This method is used to instantiate aRevocationDataVerifier
from a givenValidationPolicy
in order to synchronize the validation constraints at the current validation time.- Parameters:
validationPolicy
-ValidationPolicy
to be used- Returns:
RevocationDataVerifier
-
createRevocationDataVerifierFromPolicyWithTime
public static RevocationDataVerifier createRevocationDataVerifierFromPolicyWithTime(ValidationPolicy validationPolicy, Date validationTime) This method is used to instantiate aRevocationDataVerifier
from a givenValidationPolicy
in order to synchronize the validation constraints with a providedvalidationTime
.- Parameters:
validationPolicy
-ValidationPolicy
to be usedvalidationTime
-Date
the target validation time- Returns:
RevocationDataVerifier
-
setAcceptableDigestAlgorithms
Sets a collection of Digest Algorithms for acceptance. If a revocation token is signed with an algorithm other than listed in the collection, the token will be skipped. DEFAULT : collection of algorithms is synchronized with ETSI 119 312 V1.4.2- Parameters:
acceptableDigestAlgorithms
- a collection ifDigestAlgorithm
s
-
setAcceptableEncryptionAlgorithmKeyLength
public void setAcceptableEncryptionAlgorithmKeyLength(Map<EncryptionAlgorithm, Integer> acceptableEncryptionAlgorithmKeyLength) Sets a map of acceptable Encryption Algorithms and their corresponding minimal key length values. If a revocation token is signed with an algorithm other than listed in the collection or with a smaller key size, than the token will be skipped. DEFAULT : collection of algorithms is synchronized with ETSI 119 312 V1.4.2- Parameters:
acceptableEncryptionAlgorithmKeyLength
- a map ofEncryptionAlgorithm
s and their corresponding minimal supported key lengths
-
isAcceptable
This method verifies the validity of the givenRevocationToken
using the embedded issuer certificate token- Parameters:
revocationToken
-RevocationToken
- Returns:
- TRUE if the revocation data is acceptable to continue the validation process, FALSE otherwise
-
isAcceptable
public boolean isAcceptable(RevocationToken<?> revocationToken, CertificateToken issuerCertificateToken) This method verifies the validity of the givenRevocationToken
- Parameters:
revocationToken
-RevocationToken
issuerCertificateToken
-CertificateToken
issued the current revocation- Returns:
- TRUE if the revocation data is acceptable to continue the validation process, FALSE otherwise
-