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
FieldsModifier and TypeFieldDescriptionprotected ListCertificateSourceCertificateSource 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 ERThe evidence record to be validatedprotected ListRevocationSource<OCSP> OCSP revocation source containing merged data from signature and timestampsprotected List<TimestampToken> Enclosed timestamps -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedEvidenceRecordTimestampSource(ER evidenceRecord) Default constructor to instantiate a time-stamp source from an evidence record -
Method Summary
Modifier and TypeMethodDescriptionvoidaddExternalEvidenceRecord(EvidenceRecord evidenceRecord) Adds an external evidence record to the validation scopeprotected voidCreates and validates all timestamps Must be called only onceprotected TimestampTokencreateTimestampToken(ArchiveTimeStampObject archiveTimeStamp, EvidenceRecordTimestampType evidenceRecordTimestampType) This method is used to create aTimestampTokenfromArchiveTimeStampObjectprotected 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 TimestampedReferenceCreates a evidence record reference for the current signatureprotected List<TimestampedReference> Returns a list of timestamped references for signed data objectsReturns a list of foundTimestampTokensprotected voidpopulateSources(EvidenceRecord externalEvidenceRecord) Allows to populate all sources from an external evidence recordprotected voidpopulateSources(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 foundTimestampTokens- Returns:
- a list of
TimestampTokens
-
getDetachedEvidenceRecords
Returns a list of detached evidence records covering the evidence record- Returns:
- a list of
EvidenceRecords
-
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 aTimestampTokenfromArchiveTimeStampObject- Parameters:
archiveTimeStamp-ArchiveTimeStampObjectto 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
TimestampedReferences
-
getEncapsulatedReferencesFromTimestamp
protected List<TimestampedReference> getEncapsulatedReferencesFromTimestamp(TimestampToken timestampToken) Returns a list of TimestampedReferences for tokens encapsulated within the time-stamp token- Parameters:
timestampToken-TimestampTokento get references from- Returns:
- a list of
TimestampedReferences
-
findTimestampScopes
Finds timestamp scopes- Parameters:
timestampToken-TimestampTokento get timestamp scopes for- Returns:
- a list of
SignatureScopes
-
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 ofTimestampTokento get references from- Returns:
- a list of
TimestampedReferences
-
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 ofCryptographicInformations- Returns:
- a list of
TimestampedReferences
-
populateSources
Allows to populate all merged sources with extracted from a timestamp data- Parameters:
timestampToken-TimestampTokento populate data from
-
populateSources
Allows to populate all sources from an external evidence record- Parameters:
externalEvidenceRecord-EvidenceRecordto populate data from
-