Class AbstractTimestampSource
java.lang.Object
eu.europa.esig.dss.spi.validation.timestamp.AbstractTimestampSource
- Direct Known Subclasses:
DetachedTimestampSource,EvidenceRecordTimestampSource,PdfRevisionTimestampSource,SignatureTimestampSource
Contains a set of
TimestampTokens found in a DefaultAdvancedSignature object-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddReference(List<TimestampedReference> referenceList, Identifier identifier, TimestampedObjectType category) Adds a reference for the given identifier and categoryprotected voidaddReference(List<TimestampedReference> referenceList, TimestampedReference referenceToAdd) AddsreferenceToAddtoreferenceListwithout duplicatesprotected voidaddReferences(List<TimestampedReference> referenceList, List<TimestampedReference> referencesToAdd) AddsreferencesToAddtoreferenceListwithout duplicatesprotected TimestampedReferencecreateReferenceForCertificate(CertificateToken certificateToken) Creates aTimestampedReferencefor the providedCertificateTokenprotected TimestampedReferencecreateReferenceForIdentifier(Identifier identifier, TimestampedObjectType timestampedObjectType) Creates aTimestampedReferencefor the given identifierprotected List<TimestampedReference> createReferencesForCertificateRefs(Collection<CertificateRef> certificateRefs, CertificateSource currentCertificateSource, ListCertificateSource listCertificateSource) Returns a list of timestamped references from the given collection ofcertificateRefsprotected List<TimestampedReference> createReferencesForCertificates(Collection<CertificateToken> certificates) Creates a list ofTimestampedReferences for the provided list ofcertificatesprotected List<TimestampedReference> createReferencesForCRLBinaries(Collection<? extends EncapsulatedRevocationTokenIdentifier<CRL>> crlBinaryIdentifiers) Creates a list ofTimestampedReferences from a collection ofCRLBinarysprotected List<TimestampedReference> createReferencesForCRLRefs(Collection<? extends RevocationRef<CRL>> crlRefs, OfflineRevocationSource<CRL> currentCRLSource, ListRevocationSource<CRL> listCRLSource) Returns a list of timestamped references from the given collection ofcrlRefsprotected List<TimestampedReference> createReferencesForIdentifiers(Collection<? extends Identifier> identifiers, TimestampedObjectType timestampedObjectType) Creates a list ofTimestampedReferences from the identifiers of a given typeprotected List<TimestampedReference> createReferencesForOCSPBinaries(Collection<? extends EncapsulatedRevocationTokenIdentifier<OCSP>> ocspBinaryIdentifiers, ListCertificateSource certificateSource) Creates a list ofTimestampedReferences from a collection ofOCSPResponseBinarysprotected List<TimestampedReference> createReferencesForOCSPBinary(OCSPResponseBinary ocspResponseBinary, ListCertificateSource certificateSource) Creates a list ofTimestampedReferences for aOCSPResponseBinaryprotected List<TimestampedReference> createReferencesForOCSPRefs(Collection<? extends RevocationRef<OCSP>> ocspRefs, OfflineRevocationSource<OCSP> currentOCSPSource, ListCertificateSource listCertificateSource, ListRevocationSource<OCSP> listOCSPSource) Returns a list of timestamped references from the given collection ofocspRefsprotected List<TimestampedReference> getEncapsulatedValuesFromTimestamp(TimestampToken timestampedTimestamp, ListCertificateSource certificateSource, ListRevocationSource<CRL> crlSource, ListRevocationSource<OCSP> ocspSource) Gets a list of all validation data embedded to thetimestampedTimestampprotected List<TimestampedReference> getReferencesFromTimestamp(TimestampToken timestampToken, ListCertificateSource certificateSource, ListRevocationSource<CRL> crlSource, ListRevocationSource<OCSP> ocspSource) Incorporates all references from the giventimestampTokenprotected List<TimestampedReference> getSignerDataTimestampedReferences(List<SignatureScope> signatureScopes) Creates a list ofTimestampedReferences from a given list ofSignatureScopesprotected voidprocessEmbeddedEvidenceRecords(EvidenceRecord evidenceRecord) Enriches embedded evidence records with the covered referencesprotected voidprocessEvidenceRecordTimestamps(EvidenceRecord evidenceRecord) Enriches embedded time-stamp tokens with evidence record references
-
Constructor Details
-
AbstractTimestampSource
protected AbstractTimestampSource()Default constructor
-
-
Method Details
-
addReference
protected void addReference(List<TimestampedReference> referenceList, TimestampedReference referenceToAdd) AddsreferenceToAddtoreferenceListwithout duplicates- Parameters:
referenceList- - list ofTimestampedReferences to be extendedreferenceToAdd- -TimestampedReferenceto be added
-
addReference
protected void addReference(List<TimestampedReference> referenceList, Identifier identifier, TimestampedObjectType category) Adds a reference for the given identifier and category- Parameters:
referenceList- - list ofTimestampedReferences to be extendedidentifier- -Identifierto be addedcategory- -TimestampedObjectTypeto be added
-
addReferences
protected void addReferences(List<TimestampedReference> referenceList, List<TimestampedReference> referencesToAdd) AddsreferencesToAddtoreferenceListwithout duplicates- Parameters:
referenceList- - list ofTimestampedReferences to be extendedreferencesToAdd- -TimestampedReferences to be added
-
getReferencesFromTimestamp
protected List<TimestampedReference> getReferencesFromTimestamp(TimestampToken timestampToken, ListCertificateSource certificateSource, ListRevocationSource<CRL> crlSource, ListRevocationSource<OCSP> ocspSource) Incorporates all references from the giventimestampToken- Parameters:
timestampToken- aTimestampTokento extract values fromcertificateSource-ListCertificateSourcemerged certificate sourcecrlSource-ListRevocationSourcemerged CRL sourceocspSource-ListRevocationSourcemerged OCSP source- Returns:
- a list of
TimestampedReferences
-
getEncapsulatedValuesFromTimestamp
protected List<TimestampedReference> getEncapsulatedValuesFromTimestamp(TimestampToken timestampedTimestamp, ListCertificateSource certificateSource, ListRevocationSource<CRL> crlSource, ListRevocationSource<OCSP> ocspSource) Gets a list of all validation data embedded to thetimestampedTimestamp- Parameters:
timestampedTimestamp-TimestampTokento extract embedded values fromcertificateSource-ListCertificateSourcemerged certificate sourcecrlSource-ListRevocationSourcemerged CRL sourceocspSource-ListRevocationSourcemerged OCSP source- Returns:
- list of
TimestampedReferences
-
getSignerDataTimestampedReferences
protected List<TimestampedReference> getSignerDataTimestampedReferences(List<SignatureScope> signatureScopes) Creates a list ofTimestampedReferences from a given list ofSignatureScopes- Parameters:
signatureScopes- a list ofSignatureScopeto createTimestampedReferences for- Returns:
- a list of
TimestampedReferences
-
createReferencesForCertificates
protected List<TimestampedReference> createReferencesForCertificates(Collection<CertificateToken> certificates) Creates a list ofTimestampedReferences for the provided list ofcertificates- Parameters:
certificates- collection ofCertificateTokens- Returns:
- list of
TimestampedReferences
-
createReferenceForCertificate
Creates aTimestampedReferencefor the providedCertificateToken- Parameters:
certificateToken-CertificateToken- Returns:
TimestampedReference
-
createReferencesForIdentifiers
protected List<TimestampedReference> createReferencesForIdentifiers(Collection<? extends Identifier> identifiers, TimestampedObjectType timestampedObjectType) Creates a list ofTimestampedReferences from the identifiers of a given type- Parameters:
identifiers- a collection ofIdentifierstimestampedObjectType-TimestampedObjectTypeto create references with- Returns:
- a list of
TimestampedReferences
-
createReferenceForIdentifier
protected TimestampedReference createReferenceForIdentifier(Identifier identifier, TimestampedObjectType timestampedObjectType) Creates aTimestampedReferencefor the given identifier- Parameters:
identifier-Identifierto create a timestamped reference fromtimestampedObjectType-TimestampedObjectTypethe target timestamped reference type- Returns:
TimestampedReference
-
createReferencesForCRLBinaries
protected List<TimestampedReference> createReferencesForCRLBinaries(Collection<? extends EncapsulatedRevocationTokenIdentifier<CRL>> crlBinaryIdentifiers) Creates a list ofTimestampedReferences from a collection ofCRLBinarys- Parameters:
crlBinaryIdentifiers- a collection ofEncapsulatedRevocationTokenIdentifiers- Returns:
- a list of link
TimestampedReferences
-
createReferencesForOCSPBinaries
protected List<TimestampedReference> createReferencesForOCSPBinaries(Collection<? extends EncapsulatedRevocationTokenIdentifier<OCSP>> ocspBinaryIdentifiers, ListCertificateSource certificateSource) Creates a list ofTimestampedReferences from a collection ofOCSPResponseBinarys- Parameters:
ocspBinaryIdentifiers- a collection ofEncapsulatedRevocationTokenIdentifierscertificateSource-ListCertificateSource- Returns:
- a list of link
TimestampedReferences
-
createReferencesForOCSPBinary
protected List<TimestampedReference> createReferencesForOCSPBinary(OCSPResponseBinary ocspResponseBinary, ListCertificateSource certificateSource) Creates a list ofTimestampedReferences for aOCSPResponseBinary- Parameters:
ocspResponseBinary-OCSPResponseBinarycertificateSource-ListCertificateSource- Returns:
- a list of link
TimestampedReferences
-
createReferencesForCertificateRefs
protected List<TimestampedReference> createReferencesForCertificateRefs(Collection<CertificateRef> certificateRefs, CertificateSource currentCertificateSource, ListCertificateSource listCertificateSource) Returns a list of timestamped references from the given collection ofcertificateRefs- Parameters:
certificateRefs- a collection ofCertificateRefs to get timestamped references fromcurrentCertificateSource-CertificateSourceused to extract the collection ofCertificateRefslistCertificateSource-ListCertificateSourcemerged certificate source- Returns:
- a list of
TimestampedReferences
-
createReferencesForCRLRefs
protected List<TimestampedReference> createReferencesForCRLRefs(Collection<? extends RevocationRef<CRL>> crlRefs, OfflineRevocationSource<CRL> currentCRLSource, ListRevocationSource<CRL> listCRLSource) Returns a list of timestamped references from the given collection ofcrlRefs- Parameters:
crlRefs- a collection ofCRLRefs to get timestamped references fromcurrentCRLSource-OfflineRevocationSourceused to extract CRL referenceslistCRLSource-ListRevocationSourcemerged CRL source- Returns:
- a list of
TimestampedReferences
-
createReferencesForOCSPRefs
protected List<TimestampedReference> createReferencesForOCSPRefs(Collection<? extends RevocationRef<OCSP>> ocspRefs, OfflineRevocationSource<OCSP> currentOCSPSource, ListCertificateSource listCertificateSource, ListRevocationSource<OCSP> listOCSPSource) Returns a list of timestamped references from the given collection ofocspRefs- Parameters:
ocspRefs- a collection ofOCSPRefs to get timestamped references fromcurrentOCSPSource-OfflineRevocationSourceused to extract the OCSP referenceslistCertificateSource-ListCertificateSourcemerged certificate sourcelistOCSPSource-ListRevocationSourcemerged OCSP source- Returns:
- a list of
TimestampedReferences
-
processEvidenceRecordTimestamps
Enriches embedded time-stamp tokens with evidence record references- Parameters:
evidenceRecord-EvidenceRecord
-
processEmbeddedEvidenceRecords
Enriches embedded evidence records with the covered references- Parameters:
evidenceRecord-EvidenceRecord
-