Package eu.europa.esig.dss.validation
Class SignedDocumentValidator
java.lang.Object
eu.europa.esig.dss.validation.SignedDocumentValidator
- All Implemented Interfaces:
DocumentValidator
,ProcessExecutorProvider<DocumentProcessExecutor>
- Direct Known Subclasses:
AbstractASiCContainerValidator
,AbstractJWSDocumentValidator
,CMSDocumentValidator
,DetachedTimestampValidator
,PDFDocumentValidator
,XMLDocumentValidator
Validates a signed document. The content of the document is determined
automatically. It can be: XML, CAdES(p7m), PDF or ASiC(zip).
SignatureScopeFinder can be set using the appropriate setter (ex.
setCadesSignatureScopeFinder). By default, this class will use the default
SignatureScopeFinder as defined by
eu.europa.esig.dss.validation.scope.SignatureScopeFinderFactory
-
Field Summary
Modifier and TypeFieldDescriptionprotected CertificateVerifier
The reference to the certificate verifier.protected List<DSSDocument>
In case of an ASiC signature thisList
of container documents.protected List<DSSDocument>
In case of a detached signature thisList
contains the signed documents.protected DSSDocument
The document to be validated (with the signature(s) or timestamp(s))protected ManifestFile
A relatedManifestFile
to the provideddocument
protected DocumentProcessExecutor
This variable can hold a specificDocumentProcessExecutor
protected final SignatureScopeFinder<?>
The class to extract a list ofSignatureScope
s from a signatureprotected CertificateSource
Certificate source to find signing certificateprotected boolean
Defines if the validation context processing shall be skipped (Disable certificate chain building, revocation data collection,...) Default: false -
Constructor Summary
ModifierConstructorDescriptionprotected
The constructor with a nullsignatureScopeFinder
protected
SignedDocumentValidator
(SignatureScopeFinder<?> signatureScopeFinder) The default constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
addReference
(SignatureScope signatureScope) Checks if the signature scope shall be added as a timestamped reference NOTE: used to avoid duplicates in ASiC with CAdES validator, due to covered signature/timestamp filesprotected void
appendCounterSignatures
(List<AdvancedSignature> allSignatureList, AdvancedSignature signature) The util method to link counter signatures with the related master signaturesprotected void
Checks if the Validator configuration is validprotected List<TimestampToken>
Builds a list of detachedTimestampToken
s extracted from the documentprotected List<AdvancedSignature>
This method build a list of signatures to be extracted from a documentprotected DiagnosticDataBuilder
createDiagnosticDataBuilder
(ValidationContext validationContext, List<AdvancedSignature> signatures) Creates and fills theDiagnosticDataBuilder
with a relevant data<T extends AdvancedSignature>
voidfindSignatureScopes
(Collection<T> allSignatures) Finds and assigns SignatureScopes for a list of signaturesprotected void
findTimestampScopes
(TimestampToken timestampToken, TimestampScopeFinder timestampScopeFinder) Finds timestamp scope for theTimestampToken
static SignedDocumentValidator
fromDocument
(DSSDocument dssDocument) This method guesses the document format and returns an appropriate document validator.protected List<AdvancedSignature>
Returns a list of all signatures from the validating documentprotected DigestAlgorithm
Returns a default digest algorithm defined for a digest calculationReturns a default for a validator process executorRetrieves the detached timestamps found in the documentfinal XmlDiagnosticData
This method retrievesXmlDiagnosticData
containing all information relevant for the validation process, including the certificate and revocation tokens obtained from online resources, e.g.getOriginalDocuments
(String signatureId) This method returns the signed document(s) without their signature(s)getSignatureById
(String signatureId) Returns the signature with the given id.protected SignaturePolicyProvider
Returns a signaturePolicyProvider If not defined, returns a default providerReturns an instance of a corresponding to the formatSignaturePolicyValidatorLoader
Retrieves the signatures found in the documentprotected List<TimestampedReference>
getTimestampedReferences
(List<SignatureScope> signatureScopes) Returns a list of timestamped references from the given list ofSignatureScope
sprotected TimestampScopeFinder
This method returns a timestamp scope finderprotected TokenIdentifierProvider
GetsTokenIdentifierProvider
<T extends AdvancedSignature>
ValidationDataContainergetValidationData
(Collection<T> signatures) Extracts a validation data for provided collection of signatures<T extends AdvancedSignature>
ValidationDataContainergetValidationData
(Collection<T> signatures, Collection<TimestampToken> detachedTimestamps) Extracts a validation data for provided collection of signatures and/or timestampsprotected Date
Returns validation time In case if the validation time is not provided, initialize the current time value from the systemprotected SignedDocumentDiagnosticDataBuilder
Initializes a relevantDiagnosticDataBuilder
for the given implementationprotected ValidationDataContainer
Creates a new instance ofValidationDataContainer
abstract boolean
isSupported
(DSSDocument dssDocument) Checks if the document is supported by the current validatorprotected void
prepareDetachedTimestampValidationContext
(ValidationContext validationContext, Collection<TimestampToken> timestamps) Prepares thevalidationContext
for a timestamp validation processprotected DiagnosticDataBuilder
Creates aDiagnosticDataBuilder
protected <T extends AdvancedSignature>
voidprepareSignatureForVerification
(ValidationContext validationContext, Collection<T> allSignatureList) This method prepares aSignatureValidationContext
for signatures validationprotected void
prepareSignatureScopeFinder
(SignatureScopeFinder<?> signatureScopeFinder) Sets the provided configuration for aSignatureScopeFinder
protected <T extends AdvancedSignature>
voidprepareSignatureValidationContext
(ValidationContext validationContext, Collection<T> allSignatures) Prepares thevalidationContext
for signature validation processprotected void
prepareTimestampScopeFinder
(TimestampScopeFinder timestampScopeFinder, AdvancedSignature signature) This method is used to prepare aDetachedTimestampScopeFinder
for executionprotected <T extends AdvancedSignature>
ValidationContextprepareValidationContext
(Collection<T> signatures, Collection<TimestampToken> detachedTimestamps, CertificateVerifier certificateVerifier) Initializes and fillsValidationContext
with necessary data sources<T extends AdvancedSignature>
voidprocessSignaturesValidation
(Collection<T> allSignatureList) This method process the signature validation on the givenallSignatureList
protected final Reports
processValidationPolicy
(XmlDiagnosticData diagnosticData, ValidationPolicy validationPolicy) Executes the validation regarding the givenvalidationPolicy
protected DocumentProcessExecutor
This method returns the process executor.void
setCertificateVerifier
(CertificateVerifier certificateVerifier) To carry out the validation process of the signature(s) some external sources of certificates and of revocation data can be needed.void
setContainerContents
(List<DSSDocument> containerContents) Sets theList
ofDSSDocument
containing the original container content for ASiC-S signatures.void
setDetachedContents
(List<DSSDocument> detachedContents) Sets theList
ofDSSDocument
containing the original contents to sign, for detached signature scenarios.void
setEnableEtsiValidationReport
(boolean enableEtsiValidationReport) This method allows to specify if the ETSI Validation Report must be generated.void
setIncludeSemantics
(boolean include) This method allows to enable/disable the semantics inclusion in the reports (Indication / SubIndication meanings) Disabled by defaultvoid
Sets Locale for report messages generationvoid
setManifestFile
(ManifestFile manifestFile) Sets a relatedManifestFile
to the document to be validated.void
setProcessExecutor
(DocumentProcessExecutor processExecutor) This method provides the possibility to set the specificCustomProcessExecutor
void
setSignaturePolicyProvider
(SignaturePolicyProvider signaturePolicyProvider) This method allows to set a provider for Signature policiesvoid
setSigningCertificateSource
(CertificateSource signingCertificateSource) Set a certificate source which allows to find the signing certificate by kid or certificate's digestvoid
setSkipValidationContextExecution
(boolean skipValidationContextExecution) Sets if the validation context execution shall be skipped (skips certificate chain building, revocation requests, ...)void
setTokenExtractionStrategy
(TokenExtractionStrategy tokenExtractionStrategy) This method allows to set the token extraction strategy to follow in the diagnostic data generation.void
setTokenIdentifierProvider
(TokenIdentifierProvider tokenIdentifierProvider) Sets the TokenIdentifierProvidervoid
setValidationLevel
(ValidationLevel validationLevel) This method allows to specify the validation level (Basic / Timestamp / Long Term / Archival).void
setValidationTime
(Date validationTime) Allows to define a custom validation timeprotected void
validateContext
(ValidationContext validationContext) Process the validationValidates the document and all its signatures.validateDocument
(DSSDocument policyDocument) Validates the document and all its signatures.validateDocument
(ConstraintsParameters validationPolicyJaxb) Validates the document and all its signatures.validateDocument
(ValidationPolicy validationPolicy) Validates the document and all its signatures.validateDocument
(File policyFile) Validates the document and all its signatures.validateDocument
(InputStream policyDataStream) Validates the document and all its signatures.validateDocument
(String policyResourcePath) Validates the document and all its signatures.validateDocument
(URL validationPolicyURL) Validates the document and all its signatures.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface eu.europa.esig.dss.validation.DocumentValidator
getOriginalDocuments
-
Field Details
-
processExecutor
This variable can hold a specificDocumentProcessExecutor
-
document
The document to be validated (with the signature(s) or timestamp(s)) -
detachedContents
In case of a detached signature thisList
contains the signed documents. -
containerContents
In case of an ASiC signature thisList
of container documents. -
manifestFile
A relatedManifestFile
to the provideddocument
-
signingCertificateSource
Certificate source to find signing certificate -
certificateVerifier
The reference to the certificate verifier. The current DSS implementation proposesCommonCertificateVerifier
. This verifier encapsulates the references to different sources used in the signature validation process. -
signatureScopeFinder
The class to extract a list ofSignatureScope
s from a signature -
skipValidationContextExecution
protected boolean skipValidationContextExecutionDefines if the validation context processing shall be skipped (Disable certificate chain building, revocation data collection,...) Default: false
-
-
Constructor Details
-
SignedDocumentValidator
protected SignedDocumentValidator()The constructor with a nullsignatureScopeFinder
-
SignedDocumentValidator
The default constructor- Parameters:
signatureScopeFinder
-SignatureScopeFinder
-
-
Method Details
-
fromDocument
This method guesses the document format and returns an appropriate document validator.- Parameters:
dssDocument
- The instance ofDSSDocument
to validate- Returns:
- returns the specific instance of SignedDocumentValidator in terms of the document type
-
isSupported
Checks if the document is supported by the current validator- Parameters:
dssDocument
-DSSDocument
to check- Returns:
- TRUE if the document is supported, FALSE otherwise
-
setSigningCertificateSource
Description copied from interface:DocumentValidator
Set a certificate source which allows to find the signing certificate by kid or certificate's digest- Specified by:
setSigningCertificateSource
in interfaceDocumentValidator
- Parameters:
signingCertificateSource
- the certificate source
-
setCertificateVerifier
To carry out the validation process of the signature(s) some external sources of certificates and of revocation data can be needed. The certificate verifier is used to pass these values. Note that once this setter is called any change in the content of theCommonTrustedCertificateSource
or in adjunct certificate source is not taken into account.- Specified by:
setCertificateVerifier
in interfaceDocumentValidator
- Parameters:
certificateVerifier
-CertificateVerifier
-
setTokenExtractionStrategy
Description copied from interface:DocumentValidator
This method allows to set the token extraction strategy to follow in the diagnostic data generation.- Specified by:
setTokenExtractionStrategy
in interfaceDocumentValidator
- Parameters:
tokenExtractionStrategy
- theTokenExtractionStrategy
-
getTokenIdentifierProvider
GetsTokenIdentifierProvider
- Returns:
TokenIdentifierProvider
-
setTokenIdentifierProvider
Description copied from interface:DocumentValidator
Sets the TokenIdentifierProvider- Specified by:
setTokenIdentifierProvider
in interfaceDocumentValidator
- Parameters:
tokenIdentifierProvider
-TokenIdentifierProvider
-
setIncludeSemantics
public void setIncludeSemantics(boolean include) Description copied from interface:DocumentValidator
This method allows to enable/disable the semantics inclusion in the reports (Indication / SubIndication meanings) Disabled by default- Specified by:
setIncludeSemantics
in interfaceDocumentValidator
- Parameters:
include
- true to enable the inclusion of the semantics
-
setDetachedContents
Description copied from interface:DocumentValidator
Sets theList
ofDSSDocument
containing the original contents to sign, for detached signature scenarios.- Specified by:
setDetachedContents
in interfaceDocumentValidator
- Parameters:
detachedContents
- theList
ofDSSDocument
to set
-
setContainerContents
Description copied from interface:DocumentValidator
Sets theList
ofDSSDocument
containing the original container content for ASiC-S signatures.- Specified by:
setContainerContents
in interfaceDocumentValidator
- Parameters:
containerContents
- theList
ofDSSDocument
to set
-
setManifestFile
Description copied from interface:DocumentValidator
Sets a relatedManifestFile
to the document to be validated.- Specified by:
setManifestFile
in interfaceDocumentValidator
- Parameters:
manifestFile
- aManifestFile
to set
-
getDefaultDigestAlgorithm
Returns a default digest algorithm defined for a digest calculation- Returns:
DigestAlgorithm
-
setValidationTime
Allows to define a custom validation time- Specified by:
setValidationTime
in interfaceDocumentValidator
- Parameters:
validationTime
-Date
-
getValidationTime
Returns validation time In case if the validation time is not provided, initialize the current time value from the system- Returns:
Date
validation time
-
setValidationLevel
Description copied from interface:DocumentValidator
This method allows to specify the validation level (Basic / Timestamp / Long Term / Archival). By default, the selected validation is ARCHIVAL- Specified by:
setValidationLevel
in interfaceDocumentValidator
- Parameters:
validationLevel
-ValidationLevel
-
setEnableEtsiValidationReport
public void setEnableEtsiValidationReport(boolean enableEtsiValidationReport) Description copied from interface:DocumentValidator
This method allows to specify if the ETSI Validation Report must be generated. By default the value if TRUE (the ETSI Validation report will be generated).- Specified by:
setEnableEtsiValidationReport
in interfaceDocumentValidator
- Parameters:
enableEtsiValidationReport
- - TRUE if the report must be generated, FALSE otherwise
-
validateDocument
Description copied from interface:DocumentValidator
Validates the document and all its signatures. The default constraint file is used.- Specified by:
validateDocument
in interfaceDocumentValidator
- Returns:
Reports
: diagnostic data, detailed report and simple report
-
validateDocument
Description copied from interface:DocumentValidator
Validates the document and all its signatures. If the validation policy URL is set then the policy constraints are retrieved from this location. If null or empty the default file is used.- Specified by:
validateDocument
in interfaceDocumentValidator
- Parameters:
validationPolicyURL
-URL
- Returns:
Reports
: diagnostic data, detailed report and simple report
-
validateDocument
Description copied from interface:DocumentValidator
Validates the document and all its signatures. The policyResourcePath specifies the constraint file. If null or empty the default file is used.- Specified by:
validateDocument
in interfaceDocumentValidator
- Parameters:
policyResourcePath
- is located against the classpath (getClass().getResourceAsStream), and NOT the filesystem- Returns:
Reports
: diagnostic data, detailed report and simple report
-
validateDocument
Description copied from interface:DocumentValidator
Validates the document and all its signatures. TheFile
parameter specifies the constraint file. If null or empty the default file is used.- Specified by:
validateDocument
in interfaceDocumentValidator
- Parameters:
policyFile
- contains the validation policy (xml) asFile
- Returns:
Reports
: diagnostic data, detailed report and simple report
-
validateDocument
Description copied from interface:DocumentValidator
Validates the document and all its signatures. The policyDataStream contains the constraint file. If null or empty the default file is used.- Specified by:
validateDocument
in interfaceDocumentValidator
- Parameters:
policyDocument
- contains the validation policy (xml) asDSSDocument
- Returns:
Reports
: diagnostic data, detailed report and simple report
-
validateDocument
Validates the document and all its signatures. The policyDataStream contains the constraint file. If null or empty the default file is used.- Specified by:
validateDocument
in interfaceDocumentValidator
- Parameters:
policyDataStream
- theInputStream
with the validation policy- Returns:
- the validation reports
-
validateDocument
Validates the document and all its signatures. ThevalidationPolicyDom
contains the constraint file. If null or empty the default file is used.- Specified by:
validateDocument
in interfaceDocumentValidator
- Parameters:
validationPolicyJaxb
- theConstraintsParameters
to use in the validation process- Returns:
- the validation reports
-
validateDocument
Validates the document and all its signatures. ThevalidationPolicyDom
contains the constraint file. If null or empty the default file is used.- Specified by:
validateDocument
in interfaceDocumentValidator
- Parameters:
validationPolicy
- theValidationPolicy
to use in the validation process- Returns:
- the validation reports
-
assertConfigurationValid
protected void assertConfigurationValid()Checks if the Validator configuration is valid -
getDiagnosticData
This method retrievesXmlDiagnosticData
containing all information relevant for the validation process, including the certificate and revocation tokens obtained from online resources, e.g. AIA, CRL, OCSP (when applicable).- Returns:
XmlDiagnosticData
-
prepareDiagnosticDataBuilder
Creates aDiagnosticDataBuilder
- Returns:
DiagnosticDataBuilder
-
prepareValidationContext
protected <T extends AdvancedSignature> ValidationContext prepareValidationContext(Collection<T> signatures, Collection<TimestampToken> detachedTimestamps, CertificateVerifier certificateVerifier) Initializes and fillsValidationContext
with necessary data sources- Type Parameters:
T
-AdvancedSignature
implementation- Parameters:
signatures
- a collection ofAdvancedSignature
sdetachedTimestamps
- a collection of detachedTimestampToken
scertificateVerifier
-CertificateVerifier
to be used for the validation- Returns:
ValidationContext
-
initializeDiagnosticDataBuilder
Initializes a relevantDiagnosticDataBuilder
for the given implementation- Returns:
SignedDocumentDiagnosticDataBuilder
-
getValidationData
public <T extends AdvancedSignature> ValidationDataContainer getValidationData(Collection<T> signatures) Description copied from interface:DocumentValidator
Extracts a validation data for provided collection of signatures- Specified by:
getValidationData
in interfaceDocumentValidator
- Type Parameters:
T
-AdvancedSignature
implementation- Parameters:
signatures
- a collection ofAdvancedSignature
s- Returns:
ValidationDataContainer
-
getValidationData
public <T extends AdvancedSignature> ValidationDataContainer getValidationData(Collection<T> signatures, Collection<TimestampToken> detachedTimestamps) Description copied from interface:DocumentValidator
Extracts a validation data for provided collection of signatures and/or timestamps- Specified by:
getValidationData
in interfaceDocumentValidator
- Type Parameters:
T
-AdvancedSignature
implementation- Parameters:
signatures
- a collection ofAdvancedSignature
sdetachedTimestamps
- a collection of detachedTimestampToken
s- Returns:
ValidationDataContainer
-
instantiateValidationDataContainer
Creates a new instance ofValidationDataContainer
- Returns:
ValidationDataContainer
-
createDiagnosticDataBuilder
protected DiagnosticDataBuilder createDiagnosticDataBuilder(ValidationContext validationContext, List<AdvancedSignature> signatures) Creates and fills theDiagnosticDataBuilder
with a relevant data- Parameters:
validationContext
-ValidationContext
used for the validationsignatures
- a list ofAdvancedSignature
s to be validated collection- Returns:
- filled
DiagnosticDataBuilder
-
prepareSignatureValidationContext
protected <T extends AdvancedSignature> void prepareSignatureValidationContext(ValidationContext validationContext, Collection<T> allSignatures) Prepares thevalidationContext
for signature validation process- Type Parameters:
T
-AdvancedSignature
implementation- Parameters:
validationContext
-ValidationContext
allSignatures
- a collection of allAdvancedSignature
s to be validated
-
prepareSignatureForVerification
protected <T extends AdvancedSignature> void prepareSignatureForVerification(ValidationContext validationContext, Collection<T> allSignatureList) This method prepares aSignatureValidationContext
for signatures validation- Type Parameters:
T
-AdvancedSignature
implementation- Parameters:
validationContext
-ValidationContext
is the implementation of the validators for: certificates, timestamps and revocation data.allSignatureList
-Collection
ofAdvancedSignature
s to validate including the countersignatures
-
prepareDetachedTimestampValidationContext
protected void prepareDetachedTimestampValidationContext(ValidationContext validationContext, Collection<TimestampToken> timestamps) Prepares thevalidationContext
for a timestamp validation process- Parameters:
validationContext
-ValidationContext
timestamps
- a collection of detached timestamps
-
validateContext
Process the validation- Parameters:
validationContext
-ValidationContext
to process
-
setSignaturePolicyProvider
Description copied from interface:DocumentValidator
This method allows to set a provider for Signature policies- Specified by:
setSignaturePolicyProvider
in interfaceDocumentValidator
- Parameters:
signaturePolicyProvider
-SignaturePolicyProvider
-
getSignaturePolicyProvider
Returns a signaturePolicyProvider If not defined, returns a default provider- Returns:
SignaturePolicyProvider
-
getSignaturePolicyValidatorLoader
Returns an instance of a corresponding to the formatSignaturePolicyValidatorLoader
- Returns:
SignaturePolicyValidatorLoader
-
setProcessExecutor
Description copied from interface:ProcessExecutorProvider
This method provides the possibility to set the specificCustomProcessExecutor
- Specified by:
setProcessExecutor
in interfaceProcessExecutorProvider<DocumentProcessExecutor>
- Parameters:
processExecutor
-ProcessExecutor
-
provideProcessExecutorInstance
This method returns the process executor. If the instance of this class is not yet instantiated then the new instance is created.- Returns:
SignatureProcessExecutor
-
getDefaultProcessExecutor
Description copied from interface:ProcessExecutorProvider
Returns a default for a validator process executor- Specified by:
getDefaultProcessExecutor
in interfaceProcessExecutorProvider<DocumentProcessExecutor>
- Returns:
- Process Executor
-
processValidationPolicy
protected final Reports processValidationPolicy(XmlDiagnosticData diagnosticData, ValidationPolicy validationPolicy) Executes the validation regarding the givenvalidationPolicy
- Parameters:
diagnosticData
-DiagnosticData
contained a data to be validatedvalidationPolicy
-ValidationPolicy
- Returns:
- validation
Reports
-
getAllSignatures
Returns a list of all signatures from the validating document- Returns:
- a list of
AdvancedSignature
s
-
appendCounterSignatures
protected void appendCounterSignatures(List<AdvancedSignature> allSignatureList, AdvancedSignature signature) The util method to link counter signatures with the related master signatures- Parameters:
allSignatureList
- a list ofAdvancedSignature
ssignature
- currentAdvancedSignature
-
getSignatures
Description copied from interface:DocumentValidator
Retrieves the signatures found in the document- Specified by:
getSignatures
in interfaceDocumentValidator
- Returns:
- a list of AdvancedSignatures for validation purposes
-
buildSignatures
This method build a list of signatures to be extracted from a document- Returns:
- a list of
AdvancedSignature
s
-
getDetachedTimestamps
Description copied from interface:DocumentValidator
Retrieves the detached timestamps found in the document- Specified by:
getDetachedTimestamps
in interfaceDocumentValidator
- Returns:
- a list of TimestampToken for validation purposes
-
buildDetachedTimestamps
Builds a list of detachedTimestampToken
s extracted from the document- Returns:
- a list of
TimestampToken
s
-
processSignaturesValidation
public <T extends AdvancedSignature> void processSignaturesValidation(Collection<T> allSignatureList) Description copied from interface:DocumentValidator
This method process the signature validation on the givenallSignatureList
- Specified by:
processSignaturesValidation
in interfaceDocumentValidator
- Type Parameters:
T
-AdvancedSignature
implementation- Parameters:
allSignatureList
- a collection ofAdvancedSignature
s to be validated
-
findSignatureScopes
Finds and assigns SignatureScopes for a list of signatures- Specified by:
findSignatureScopes
in interfaceDocumentValidator
- Type Parameters:
T
-AdvancedSignature
implementation- Parameters:
allSignatures
- a list ofAdvancedSignature
s to get a SignatureScope list
-
prepareSignatureScopeFinder
Sets the provided configuration for aSignatureScopeFinder
- Parameters:
signatureScopeFinder
-SignatureScopeFinder
to configure
-
findTimestampScopes
protected void findTimestampScopes(TimestampToken timestampToken, TimestampScopeFinder timestampScopeFinder) Finds timestamp scope for theTimestampToken
- Parameters:
timestampToken
-TimestampToken
to find timestamp scope fortimestampScopeFinder
-TimestampScopeFinder
to use
-
getTimestampedReferences
Returns a list of timestamped references from the given list ofSignatureScope
s- Parameters:
signatureScopes
- a list ofSignatureScope
s- Returns:
- a list of
TimestampedReference
s
-
addReference
Checks if the signature scope shall be added as a timestamped reference NOTE: used to avoid duplicates in ASiC with CAdES validator, due to covered signature/timestamp files- Parameters:
signatureScope
-SignatureScope
to check- Returns:
- TRUE if the timestamped reference shall be created for the given
SignatureScope
, FALSE otherwise
-
getTimestampScopeFinder
This method returns a timestamp scope finder- Returns:
TimestampScopeFinder
-
prepareTimestampScopeFinder
protected void prepareTimestampScopeFinder(TimestampScopeFinder timestampScopeFinder, AdvancedSignature signature) This method is used to prepare aDetachedTimestampScopeFinder
for execution- Parameters:
timestampScopeFinder
-DetachedTimestampScopeFinder
signature
-AdvancedSignature
used for encapsulated timestamps
-
setSkipValidationContextExecution
public void setSkipValidationContextExecution(boolean skipValidationContextExecution) Sets if the validation context execution shall be skipped (skips certificate chain building, revocation requests, ...)- Parameters:
skipValidationContextExecution
- if the context validation shall be skipped
-
setLocale
Sets Locale for report messages generation- Parameters:
locale
-Locale
-
getOriginalDocuments
Description copied from interface:DocumentValidator
This method returns the signed document(s) without their signature(s)- Specified by:
getOriginalDocuments
in interfaceDocumentValidator
- Parameters:
signatureId
- the DSS ID of the signature to extract original signer data for- Returns:
- list of
DSSDocument
s
-
getSignatureById
Returns the signature with the given id. Processes customTokenIdentifierProvider
and counter signatures- Parameters:
signatureId
-String
id of a signature to be extracted- Returns:
AdvancedSignature
with the given id if found, NULL otherwise
-