public class SignatureValidationContext extends Object implements ValidationContext
| Modifier and Type | Field and Description |
|---|---|
protected Date |
currentTime
This is the time at what the validation is carried out.
|
protected CertificatePool |
validationCertificatePool
The certificate pool which encapsulates all certificates used during the validation process and extracted from
all used sources
|
| Constructor and Description |
|---|
SignatureValidationContext()
This constructor is used during the signature creation process.
|
SignatureValidationContext(CertificatePool validationCertificatePool)
This constructor is used when a signature need to be validated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCertificateTokenForVerification(CertificateToken certificateToken)
Adds a new certificate token to the list of tokens to verify.
|
void |
addRevocationTokensForVerification(List<RevocationToken> revocationTokens)
Adds a list of new revocation tokens to the list of tokens to verify.
|
void |
addTimestampTokenForVerification(TimestampToken timestampToken)
Adds a new timestamp token to the list of tokens to verify.
|
Date |
getCurrentTime() |
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.
|
void |
initialize(CertificateVerifier certificateVerifier) |
void |
setCurrentTime(Date currentTime)
This function sets the validation time.
|
String |
toString() |
String |
toString(String indentStr)
This method returns the human readable representation of the ValidationContext.
|
void |
validate()
Carries out the validation process in recursive manner for not yet checked tokens.
|
protected CertificatePool validationCertificatePool
protected Date currentTime
public SignatureValidationContext()
public SignatureValidationContext(CertificatePool validationCertificatePool)
validationCertificatePool - The pool of certificates used during the validation processpublic void initialize(CertificateVerifier certificateVerifier)
initialize in interface ValidationContextcertificateVerifier - The certificates verifier (eg: using the TSL as list of trusted certificates).public Date getCurrentTime()
getCurrentTime in interface ValidationContextpublic void setCurrentTime(Date currentTime)
ValidationContextsetCurrentTime in interface ValidationContextcurrentTime - Datepublic void addRevocationTokensForVerification(List<RevocationToken> revocationTokens)
ValidationContextaddRevocationTokensForVerification in interface ValidationContextpublic void addCertificateTokenForVerification(CertificateToken certificateToken)
ValidationContextaddCertificateTokenForVerification in interface ValidationContextcertificateToken - CertificateToken certificate token to verifypublic void addTimestampTokenForVerification(TimestampToken timestampToken)
ValidationContextaddTimestampTokenForVerification in interface ValidationContexttimestampToken - TimestampToken timestamp token to verifypublic void validate()
throws DSSException
ValidationContextvalidate in interface ValidationContextDSSExceptionpublic Set<CertificateToken> getProcessedCertificates()
ValidationContextgetProcessedCertificates in interface ValidationContextpublic Set<RevocationToken> getProcessedRevocations()
ValidationContextgetProcessedRevocations in interface ValidationContextpublic Set<TimestampToken> getProcessedTimestamps()
ValidationContextgetProcessedTimestamps in interface ValidationContextpublic String toString(String indentStr)
indentStr - Copyright © 2018. All rights reserved.