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 CertificateVerifiers, as it may lead to concurrency issues during the execution
in multi-threaded environments.
Please use a new RevocationDataVerifier per each CertificateVerifier.-
Field Summary
FieldsModifier 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 ListCertificateSourceThe trusted certificate source is used to accept trusted OCSPToken's certificate issuers -
Method Summary
Modifier and TypeMethodDescriptionstatic RevocationDataVerifierThis method is used to instantiate a newRevocationDataVerifier, using the default validation constraints (synchronized with default validation policy).static RevocationDataVerifiercreateRevocationDataVerifierFromPolicy(ValidationPolicy validationPolicy) This method is used to instantiate aRevocationDataVerifierfrom a givenValidationPolicyin order to synchronize the validation constraints at the current validation time.static RevocationDataVerifiercreateRevocationDataVerifierFromPolicyWithTime(ValidationPolicy validationPolicy, Date validationTime) This method is used to instantiate aRevocationDataVerifierfrom a givenValidationPolicyin order to synchronize the validation constraints with a providedvalidationTime.booleanisAcceptable(RevocationToken<?> revocationToken) This method verifies the validity of the givenRevocationTokenusing the embedded issuer certificate tokenbooleanisAcceptable(RevocationToken<?> revocationToken, CertificateToken issuerCertificateToken) This method verifies the validity of the givenRevocationTokenvoidsetAcceptableDigestAlgorithms(Collection<DigestAlgorithm> acceptableDigestAlgorithms) Sets a collection of Digest Algorithms for acceptance.voidsetAcceptableEncryptionAlgorithmKeyLength(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 aRevocationDataVerifierfrom a givenValidationPolicyin order to synchronize the validation constraints at the current validation time.- Parameters:
validationPolicy-ValidationPolicyto be used- Returns:
RevocationDataVerifier
-
createRevocationDataVerifierFromPolicyWithTime
public static RevocationDataVerifier createRevocationDataVerifierFromPolicyWithTime(ValidationPolicy validationPolicy, Date validationTime) This method is used to instantiate aRevocationDataVerifierfrom a givenValidationPolicyin order to synchronize the validation constraints with a providedvalidationTime.- Parameters:
validationPolicy-ValidationPolicyto be usedvalidationTime-Datethe 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 ifDigestAlgorithms
-
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 ofEncryptionAlgorithms and their corresponding minimal supported key lengths
-
isAcceptable
This method verifies the validity of the givenRevocationTokenusing 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-RevocationTokenissuerCertificateToken-CertificateTokenissued the current revocation- Returns:
- TRUE if the revocation data is acceptable to continue the validation process, FALSE otherwise
-