Class EvidenceRecordTimestampSource<ER extends DefaultEvidenceRecord>
java.lang.Object
eu.europa.esig.dss.spi.validation.timestamp.AbstractTimestampSource
eu.europa.esig.dss.evidencerecord.common.validation.timestamp.EvidenceRecordTimestampSource<ER>
- Type Parameters:
ER
-DefaultEvidenceRecord
- Direct Known Subclasses:
ASN1EvidenceRecordTimestampSource
,XMLEvidenceRecordTimestampSource
public abstract class EvidenceRecordTimestampSource<ER extends DefaultEvidenceRecord>
extends AbstractTimestampSource
This class is used for extraction and validation of time-stamps incorporated within an Evidence Record
-
Field Summary
Modifier and TypeFieldDescriptionprotected ListCertificateSource
CertificateSource containing merged data from signature and timestampsprotected ListRevocationSource
<CRL> CRL revocation source containing merged data from signature and timestampsprotected List
<EvidenceRecord> This variable contains the list of detached evidence record tokens covering the evidence record.protected final ER
The evidence record to be validatedprotected ListRevocationSource
<OCSP> OCSP revocation source containing merged data from signature and timestampsprotected List
<TimestampToken> Enclosed timestamps -
Constructor Summary
ModifierConstructorDescriptionprotected
EvidenceRecordTimestampSource
(ER evidenceRecord) Default constructor to instantiate a time-stamp source from an evidence record -
Method Summary
Modifier and TypeMethodDescriptionvoid
addExternalEvidenceRecord
(EvidenceRecord evidenceRecord) Adds an external evidence record to the validation scopeprotected void
Creates and validates all timestamps Must be called only onceprotected TimestampToken
createTimestampToken
(ArchiveTimeStampObject archiveTimeStamp, EvidenceRecordTimestampType evidenceRecordTimestampType) This method is used to create aTimestampToken
fromArchiveTimeStampObject
protected List
<SignatureScope> findTimestampScopes
(TimestampToken timestampToken) Finds timestamp scopesReturns a list of detached evidence records covering the evidence recordprotected List
<TimestampedReference> getEncapsulatedReferencesFromCryptographicInformationList
(List<CryptographicInformation> cryptographicInformationList) Returns a list of TimestampedReferences for tokens encapsulated within the CryptographicInformationList element in Evidence Recordprotected List
<TimestampedReference> getEncapsulatedReferencesFromTimestamp
(TimestampToken timestampToken) Returns a list of TimestampedReferences for tokens encapsulated within the time-stamp tokenprotected List
<TimestampedReference> getEncapsulatedReferencesFromTimestamps
(List<TimestampToken> timestampTokens) Returns a list of TimestampedReferences for tokens encapsulated within the list of timestampTokensprotected TimestampedReference
Creates a evidence record reference for the current signatureprotected List
<TimestampedReference> Returns a list of timestamped references for signed data objectsReturns a list of foundTimestampToken
sprotected void
populateSources
(EvidenceRecord externalEvidenceRecord) Allows to populate all sources from an external evidence recordprotected void
populateSources
(TimestampToken timestampToken) Allows to populate all merged sources with extracted from a timestamp dataMethods inherited from class eu.europa.esig.dss.spi.validation.timestamp.AbstractTimestampSource
addReference, addReference, addReferences, createReferenceForCertificate, createReferenceForIdentifier, createReferencesForCertificateRefs, createReferencesForCertificates, createReferencesForCRLBinaries, createReferencesForCRLRefs, createReferencesForIdentifiers, createReferencesForOCSPBinaries, createReferencesForOCSPBinary, createReferencesForOCSPRefs, getEncapsulatedValuesFromTimestamp, getReferencesFromTimestamp, getSignerDataTimestampedReferences, processEmbeddedEvidenceRecords, processEvidenceRecordTimestamps
-
Field Details
-
evidenceRecord
The evidence record to be validated -
crlSource
CRL revocation source containing merged data from signature and timestamps -
ocspSource
OCSP revocation source containing merged data from signature and timestamps -
certificateSource
CertificateSource containing merged data from signature and timestamps -
timestamps
Enclosed timestamps -
detachedEvidenceRecords
This variable contains the list of detached evidence record tokens covering the evidence record.
-
-
Constructor Details
-
EvidenceRecordTimestampSource
Default constructor to instantiate a time-stamp source from an evidence record- Parameters:
evidenceRecord
-EvidenceRecord
-
-
Method Details
-
getTimestamps
Returns a list of foundTimestampToken
s- Returns:
- a list of
TimestampToken
s
-
getDetachedEvidenceRecords
Returns a list of detached evidence records covering the evidence record- Returns:
- a list of
EvidenceRecord
s
-
addExternalEvidenceRecord
Adds an external evidence record to the validation scope- Parameters:
evidenceRecord
-EvidenceRecord
-
createAndValidate
protected void createAndValidate()Creates and validates all timestamps Must be called only once -
createTimestampToken
protected TimestampToken createTimestampToken(ArchiveTimeStampObject archiveTimeStamp, EvidenceRecordTimestampType evidenceRecordTimestampType) This method is used to create aTimestampToken
fromArchiveTimeStampObject
- Parameters:
archiveTimeStamp
-ArchiveTimeStampObject
to extract time-stamp token fromevidenceRecordTimestampType
-EvidenceRecordTimestampType
- Returns:
TimestampToken
-
getEvidenceRecordReference
Creates a evidence record reference for the current signature- Returns:
TimestampedReference
-
getSignerDataReferences
Returns a list of timestamped references for signed data objects- Returns:
- a list of
TimestampedReference
s
-
getEncapsulatedReferencesFromTimestamp
protected List<TimestampedReference> getEncapsulatedReferencesFromTimestamp(TimestampToken timestampToken) Returns a list of TimestampedReferences for tokens encapsulated within the time-stamp token- Parameters:
timestampToken
-TimestampToken
to get references from- Returns:
- a list of
TimestampedReference
s
-
findTimestampScopes
Finds timestamp scopes- Parameters:
timestampToken
-TimestampToken
to get timestamp scopes for- Returns:
- a list of
SignatureScope
s
-
getEncapsulatedReferencesFromTimestamps
protected List<TimestampedReference> getEncapsulatedReferencesFromTimestamps(List<TimestampToken> timestampTokens) Returns a list of TimestampedReferences for tokens encapsulated within the list of timestampTokens- Parameters:
timestampTokens
- a list ofTimestampToken
to get references from- Returns:
- a list of
TimestampedReference
s
-
getEncapsulatedReferencesFromCryptographicInformationList
protected List<TimestampedReference> getEncapsulatedReferencesFromCryptographicInformationList(List<CryptographicInformation> cryptographicInformationList) Returns a list of TimestampedReferences for tokens encapsulated within the CryptographicInformationList element in Evidence Record- Parameters:
cryptographicInformationList
- a list ofCryptographicInformation
s- Returns:
- a list of
TimestampedReference
s
-
populateSources
Allows to populate all merged sources with extracted from a timestamp data- Parameters:
timestampToken
-TimestampToken
to populate data from
-
populateSources
Allows to populate all sources from an external evidence record- Parameters:
externalEvidenceRecord
-EvidenceRecord
to populate data from
-