Package eu.europa.esig.dss.validation
Interface ValidationContext
-
- All Known Implementing Classes:
SignatureValidationContext
public interface ValidationContextThis interface allows the implementation of the validators for: certificates, timestamps and revocation data.
-
-
Method Summary
Modifier and Type Method Description voidaddCertificateTokenForVerification(CertificateToken certificateToken)Adds a new certificate token to the list of tokens to verify.voidaddRevocationTokensForVerification(List<RevocationToken> revocationTokens)Adds a list of new revocation tokens to the list of tokens to verify.voidaddTimestampTokenForVerification(TimestampToken timestampToken)Adds a new timestamp token to the list of tokens to verify.Map<CertificateToken,Set<CertificateSourceType>>getCertificateSourceTypes()Returns a map ofCertificateSourceTypebyCertificateTokenwhich contains the sources where the certificate was found.DategetCurrentTime()Set<CertificateToken>getProcessedCertificates()Returns a read only list of all certificates used in the process of the validation of all signatures from the given document.Set<RevocationToken>getProcessedRevocations()Returns a read only list of all revocations used in the process of the validation of all signatures from the given document.Set<TimestampToken>getProcessedTimestamps()Returns a read only list of all timestamps processed during the validation of all signatures from the given document.voidinitialize(CertificateVerifier certificateVerifier)booleanisAllCertificateValid()This method allows to verify if all processed certificates are not revokedbooleanisAllPOECoveredByRevocationData()This method allows to verify if all POE (timestamp tokens) are covered by a revocation databooleanisAllRequiredRevocationDataPresent()This method allows to verify if all processed certificates have a revocation databooleanisAllTimestampValid()This method allows to verify if all processed timestamps are valid and intactbooleanisAtLeastOneRevocationDataPresentAfterBestSignatureTime(CertificateToken signingCertificate)This method allows to verify if there is at least one revocation data present after the earliest available timestamp token producing timevoidsetCurrentTime(Date currentTime)This function sets the validation time.voidvalidate()Carries out the validation process in recursive manner for not yet checked tokens.
-
-
-
Method Detail
-
setCurrentTime
void setCurrentTime(Date currentTime)
This function sets the validation time.- Parameters:
currentTime- the currentDate
-
initialize
void initialize(CertificateVerifier certificateVerifier)
-
getCurrentTime
Date getCurrentTime()
-
addRevocationTokensForVerification
void addRevocationTokensForVerification(List<RevocationToken> revocationTokens)
Adds a list of new revocation tokens to the list of tokens to verify. If the revocation token has already been added then it is ignored.- Parameters:
revocationTokens- a list ofRevocationTokenrevocation tokens to verify
-
addCertificateTokenForVerification
void addCertificateTokenForVerification(CertificateToken certificateToken)
Adds a new certificate token to the list of tokens to verify. If the certificate token has already been added then it is ignored.- Parameters:
certificateToken-CertificateTokencertificate token to verify
-
addTimestampTokenForVerification
void addTimestampTokenForVerification(TimestampToken timestampToken)
Adds a new timestamp token to the list of tokens to verify. If the timestamp token has already been added then it is ignored.- Parameters:
timestampToken-TimestampTokentimestamp token to verify
-
validate
void validate() throws DSSExceptionCarries out the validation process in recursive manner for not yet checked tokens.- Throws:
DSSException- if an error occurred
-
isAllRequiredRevocationDataPresent
boolean isAllRequiredRevocationDataPresent()
This method allows to verify if all processed certificates have a revocation data- Returns:
- true if at least one revocation data is present for each certificate
-
isAllPOECoveredByRevocationData
boolean isAllPOECoveredByRevocationData()
This method allows to verify if all POE (timestamp tokens) are covered by a revocation data- Returns:
- true if all POE have at least one revocation data issued after the POE creation
-
isAllTimestampValid
boolean isAllTimestampValid()
This method allows to verify if all processed timestamps are valid and intact- Returns:
- true if all processed timestamps are valid
-
isAllCertificateValid
boolean isAllCertificateValid()
This method allows to verify if all processed certificates are not revoked- Returns:
- true if all processed certificates are still valid
-
isAtLeastOneRevocationDataPresentAfterBestSignatureTime
boolean isAtLeastOneRevocationDataPresentAfterBestSignatureTime(CertificateToken signingCertificate)
This method allows to verify if there is at least one revocation data present after the earliest available timestamp token producing time- Parameters:
signingCertificate-CertificateTokensigning certificate of the signature to be checked- Returns:
- true if there is at least one revocation data issued after the earliest timestamp time
-
getProcessedCertificates
Set<CertificateToken> getProcessedCertificates()
Returns a read only list of all certificates used in the process of the validation of all signatures from the given document. This list includes the certificate to check, certification chain certificates, OCSP response certificate...- Returns:
- The list of CertificateToken(s)
-
getCertificateSourceTypes
Map<CertificateToken,Set<CertificateSourceType>> getCertificateSourceTypes()
Returns a map ofCertificateSourceTypebyCertificateTokenwhich contains the sources where the certificate was found.- Returns:
- a map of CertificateSourceType by CertificateToken
-
getProcessedRevocations
Set<RevocationToken> getProcessedRevocations()
Returns a read only list of all revocations used in the process of the validation of all signatures from the given document.- Returns:
- The list of CertificateToken(s)
-
getProcessedTimestamps
Set<TimestampToken> getProcessedTimestamps()
Returns a read only list of all timestamps processed during the validation of all signatures from the given document.- Returns:
- The list of CertificateToken(s)
-
-