Class ASN1EvidenceRecordTimeStampSequenceVerifier
java.lang.Object
eu.europa.esig.dss.evidencerecord.common.validation.EvidenceRecordTimeStampSequenceVerifier
eu.europa.esig.dss.evidencerecord.asn1.validation.ASN1EvidenceRecordTimeStampSequenceVerifier
public class ASN1EvidenceRecordTimeStampSequenceVerifier
extends EvidenceRecordTimeStampSequenceVerifier
Verifies ArchiveTimeStampSequence for an ASN.1 Evidence Record
-
Field Summary
Fields inherited from class eu.europa.esig.dss.evidencerecord.common.validation.EvidenceRecordTimeStampSequenceVerifier
evidenceRecord
-
Constructor Summary
ConstructorDescriptionASN1EvidenceRecordTimeStampSequenceVerifier
(ASN1EvidenceRecord evidenceRecord) Default constructor to instantiate an ASN.1 evidence record verifier -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
checkHashTreeValidity
(ArchiveTimeStampObject archiveTimeStamp, ArchiveTimeStampChainObject archiveTimeStampChain) This method verifies whether theArchiveTimeStampObject
and its hash-tree is valid relatively the parentArchiveTimeStampChainObject
protected DSSMessageDigest
computeTimeStampHash
(ArchiveTimeStampObject archiveTimeStamp) Computes hash onarchiveTimeStamp
element provided thearchiveTimeStampChain
's attributesprotected DSSMessageDigest
computeTimeStampSequenceHash
(ArchiveTimeStampChainObject archiveTimeStampChain) Computes hash of currentArchiveTimeStampSequenceElement
protected DataObjectDigestBuilder
getDataObjectDigestBuilder
(DSSDocument document, ArchiveTimeStampChainObject archiveTimeStampChain) ReturnsDataObjectDigestBuilder
corresponding to the current implementationprotected ASN1ArchiveTimeStampSequenceDigestHelper
This method returns a helper class containing supporting methods for digest computation in relation to an archive-time-stamp-sequenceprotected List
<byte[]> getLastTimeStampSequenceHashList
(DSSMessageDigest lastTimeStampSequenceHash, List<DSSDocument> detachedDocuments) Returns a list of hashes computed on a given previous time-stamp sequence hashprotected DSSDocument
getMatchingDocument
(Digest digest, ArchiveTimeStampChainObject archiveTimeStampChain, DSSMessageDigest lastTimeStampSequenceHash, List<DSSDocument> detachedContents) This method returns a document with matchingDigest
from a provided list ofdetachedContents
protected List
<ReferenceValidation> validateArchiveTimeStampSequenceDigest
(List<ReferenceValidation> referenceValidations, DSSMessageDigest lastTimeStampSequenceHashes) This method is used to verify presence of ArchiveTimeStampSequence digests within the reference validation list.Methods inherited from class eu.europa.esig.dss.evidencerecord.common.validation.EvidenceRecordTimeStampSequenceVerifier
computeDigestValueGroupHash, getDocumentDigest, getHashTree, getMatchingDocument, getMatchingManifestEntry, getReferenceValidations, validateArchiveDataObjects, validateArchiveTimeStampDigest, verify
-
Constructor Details
-
ASN1EvidenceRecordTimeStampSequenceVerifier
Default constructor to instantiate an ASN.1 evidence record verifier- Parameters:
evidenceRecord
-ASN1EvidenceRecord
XML evidence record to be validated
-
-
Method Details
-
getDataObjectDigestBuilder
protected DataObjectDigestBuilder getDataObjectDigestBuilder(DSSDocument document, ArchiveTimeStampChainObject archiveTimeStampChain) Description copied from class:EvidenceRecordTimeStampSequenceVerifier
ReturnsDataObjectDigestBuilder
corresponding to the current implementation- Specified by:
getDataObjectDigestBuilder
in classEvidenceRecordTimeStampSequenceVerifier
- Parameters:
document
-DSSDocument
document to build digest forarchiveTimeStampChain
-ArchiveTimeStampChainObject
of the current hashtree- Returns:
DataObjectDigestBuilder
-
getMatchingDocument
protected DSSDocument getMatchingDocument(Digest digest, ArchiveTimeStampChainObject archiveTimeStampChain, DSSMessageDigest lastTimeStampSequenceHash, List<DSSDocument> detachedContents) This method returns a document with matchingDigest
from a provided list ofdetachedContents
- Overrides:
getMatchingDocument
in classEvidenceRecordTimeStampSequenceVerifier
- Parameters:
digest
-Digest
to checkarchiveTimeStampChain
-ArchiveTimeStampChainObject
defines configuration for validationlastTimeStampSequenceHash
-DSSMessageDigest
hash of the last archive time-stamp sequencedetachedContents
- a list ofDSSDocument
s- Returns:
DSSDocument
if matching document found, NULL otherwise
-
checkHashTreeValidity
protected boolean checkHashTreeValidity(ArchiveTimeStampObject archiveTimeStamp, ArchiveTimeStampChainObject archiveTimeStampChain) Description copied from class:EvidenceRecordTimeStampSequenceVerifier
This method verifies whether theArchiveTimeStampObject
and its hash-tree is valid relatively the parentArchiveTimeStampChainObject
- Overrides:
checkHashTreeValidity
in classEvidenceRecordTimeStampSequenceVerifier
- Parameters:
archiveTimeStamp
-ArchiveTimeStampObject
archiveTimeStampChain
-ArchiveTimeStampChainObject
- Returns:
- TRUE if the validation succeeds, FALSE otherwise
-
computeTimeStampHash
Description copied from class:EvidenceRecordTimeStampSequenceVerifier
Computes hash onarchiveTimeStamp
element provided thearchiveTimeStampChain
's attributes- Specified by:
computeTimeStampHash
in classEvidenceRecordTimeStampSequenceVerifier
- Parameters:
archiveTimeStamp
-ArchiveTimeStampObject
to compute hash on- Returns:
DSSMessageDigest
-
computeTimeStampSequenceHash
protected DSSMessageDigest computeTimeStampSequenceHash(ArchiveTimeStampChainObject archiveTimeStampChain) Description copied from class:EvidenceRecordTimeStampSequenceVerifier
Computes hash of currentArchiveTimeStampSequenceElement
- Specified by:
computeTimeStampSequenceHash
in classEvidenceRecordTimeStampSequenceVerifier
- Parameters:
archiveTimeStampChain
-ArchiveTimeStampChainObject
to compute hash for- Returns:
DSSMessageDigest
-
validateArchiveTimeStampSequenceDigest
protected List<ReferenceValidation> validateArchiveTimeStampSequenceDigest(List<ReferenceValidation> referenceValidations, DSSMessageDigest lastTimeStampSequenceHashes) Description copied from class:EvidenceRecordTimeStampSequenceVerifier
This method is used to verify presence of ArchiveTimeStampSequence digests within the reference validation list. If entry is not present, created one, when applicable- Overrides:
validateArchiveTimeStampSequenceDigest
in classEvidenceRecordTimeStampSequenceVerifier
- Parameters:
referenceValidations
- a list ofReferenceValidation
slastTimeStampSequenceHashes
-DSSMessageDigest
- Returns:
- an updated list of
ReferenceValidation
s
-
getLastTimeStampSequenceHashList
protected List<byte[]> getLastTimeStampSequenceHashList(DSSMessageDigest lastTimeStampSequenceHash, List<DSSDocument> detachedDocuments) Description copied from class:EvidenceRecordTimeStampSequenceVerifier
Returns a list of hashes computed on a given previous time-stamp sequence hash- Overrides:
getLastTimeStampSequenceHashList
in classEvidenceRecordTimeStampSequenceVerifier
- Parameters:
lastTimeStampSequenceHash
-DSSMessageDigest
of the previous ArchiveTimeStampSequencedetachedDocuments
- a list of detachedDSSDocument
s- Returns:
- a list of byte arrays
-
getEvidenceRecordRenewalDigestBuilderHelper
This method returns a helper class containing supporting methods for digest computation in relation to an archive-time-stamp-sequence
-