Module jpms_dss_document
Class SignatureTimestampSource<AS extends AdvancedSignature,SA extends SignatureAttribute>
java.lang.Object
eu.europa.esig.dss.validation.timestamp.AbstractTimestampSource
eu.europa.esig.dss.validation.timestamp.SignatureTimestampSource<AS,SA>
- Type Parameters:
AS-AdvancedSignatureimplementationSA- the correspondingSignatureAttribute
- All Implemented Interfaces:
TimestampSource,Serializable
public abstract class SignatureTimestampSource<AS extends AdvancedSignature,SA extends SignatureAttribute>
extends AbstractTimestampSource
implements TimestampSource
The timestamp source of a signature
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<eu.europa.esig.dss.spi.x509.tsp.TimestampToken> This variable contains the list of enclosed archive signature timestamps.protected eu.europa.esig.dss.spi.x509.ListCertificateSourceCertificateSource containing merged data from signature and timestampsprotected List<eu.europa.esig.dss.spi.x509.tsp.TimestampToken> Enclosed content timestamps.protected eu.europa.esig.dss.spi.x509.revocation.ListRevocationSource<eu.europa.esig.dss.model.x509.revocation.crl.CRL> CRL revocation source containing merged data from signature and timestampsprotected List<EvidenceRecord> This variable contains the list of evidence records detached from the signature document.protected List<eu.europa.esig.dss.spi.x509.tsp.TimestampToken> This variable contains the list of detached timestamp tokens (used in ASiC with CAdES).protected List<EvidenceRecord> This variable contains the list of evidence records embedded to the signature document.protected eu.europa.esig.dss.spi.x509.revocation.ListRevocationSource<eu.europa.esig.dss.model.x509.revocation.ocsp.OCSP> OCSP revocation source containing merged data from signature and timestampsprotected List<eu.europa.esig.dss.spi.x509.tsp.TimestampToken> Enclosed RefsOnly timestamps.protected List<eu.europa.esig.dss.spi.x509.tsp.TimestampToken> Enclosed SignAndRefs timestamps.protected final ASThe signature is being validatedprotected List<eu.europa.esig.dss.spi.x509.tsp.TimestampToken> Enclosed signature timestamps.protected List<eu.europa.esig.dss.spi.x509.tsp.TimestampedReference> A list of all TimestampedReferences extracted from a signature -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSignatureTimestampSource(AS signature) Default constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidaddExternalEvidenceRecord(EvidenceRecord evidenceRecord) This method allows to add an external evidence record.voidaddExternalTimestamp(eu.europa.esig.dss.spi.x509.tsp.TimestampToken timestamp) This method allows to add an external timestamp.protected abstract SignatureProperties<SA> Creates the 'signed-signature-properties' element of the signatureprotected abstract SignatureProperties<SA> Creates the 'unsigned-signature-properties' element of the signatureprotected voidCreates and validates all timestamps Must be called only onceReturns a list of all evidence records associated with the signatureList<eu.europa.esig.dss.spi.x509.tsp.TimestampToken> Returns a list of all incorporated timestampsList<eu.europa.esig.dss.spi.x509.tsp.TimestampToken> Returns a list of allTimestampTokens except the last archive timestampprotected List<eu.europa.esig.dss.spi.x509.tsp.TimestampedReference> getArchiveTimestampReferences(List<eu.europa.esig.dss.spi.x509.tsp.TimestampToken> previousTimestamps) Returns a list of time-stamped references for an archival time-stampList<eu.europa.esig.dss.spi.x509.tsp.TimestampToken> Returns a list of incorporated archive timestampsprotected abstract eu.europa.esig.dss.enumerations.ArchiveTimestampTypegetArchiveTimestampType(SA unsignedAttribute) ReturnsArchiveTimestampTypefor the givenunsignedAttributeprotected IntegergetAttributeOrder(SA signatureAttribute) Gets position of thesignatureAttributeeither within signed or unsigned propertiesprotected abstract List<eu.europa.esig.dss.spi.x509.CertificateRef> getCertificateRefs(SA unsignedAttribute) Returns a list ofCertificateRefs from the givenunsignedAttributeList<eu.europa.esig.dss.spi.x509.tsp.TimestampToken> Returns a list of incorporated content timestampsprotected List<eu.europa.esig.dss.spi.x509.tsp.TimestampedReference> getCounterSignatureReferences(AdvancedSignature counterSignature) Returns a list of references extracted from a counter signatureprotected abstract List<AdvancedSignature> getCounterSignatures(SA unsignedAttribute) Extracts Counter Signatures from the givenunsignedAttributeprotected List<eu.europa.esig.dss.spi.x509.tsp.TimestampedReference> getCounterSignaturesReferences(List<AdvancedSignature> counterSignatures) Returns a list ofTimestampedReferences encapsulated from the list of counter signaturesprotected abstract List<eu.europa.esig.dss.spi.x509.revocation.crl.CRLRef> getCRLRefs(SA unsignedAttribute) Returns a list of CRL revocation refs from the givenunsignedAttributeReturns a list of evidence records detached from a signature documentList<eu.europa.esig.dss.spi.x509.tsp.TimestampToken> Returns a list of detached timestamps (used in ASiC with CAdES)List<eu.europa.esig.dss.spi.x509.tsp.TimestampToken> Returns a list of incorporated document timestamps (PAdES only)Returns a list of evidence records embedded to a signature documentprotected abstract List<eu.europa.esig.dss.model.identifier.Identifier> getEncapsulatedCertificateIdentifiers(SA unsignedAttribute) Returns a list ofIdentifiers obtained from the givenunsignedAttributeprotected abstract List<eu.europa.esig.dss.crl.CRLBinary> getEncapsulatedCRLIdentifiers(SA unsignedAttribute) Returns a list ofCRLBinarys obtained from the givenunsignedAttributeprotected abstract List<eu.europa.esig.dss.spi.x509.revocation.ocsp.OCSPResponseBinary> getEncapsulatedOCSPIdentifiers(SA unsignedAttribute) Returns a list ofOCSPResponseBinarys obtained from the givenunsignedAttributeprotected List<eu.europa.esig.dss.spi.x509.tsp.TimestampedReference> getEncapsulatedReferencesFromTimestamps(List<eu.europa.esig.dss.spi.x509.tsp.TimestampToken> timestampTokens) Returns a list of TimestampedReferences for tokens encapsulated within the list of timestampTokensprotected List<eu.europa.esig.dss.spi.x509.tsp.TimestampedReference> Returns references from the KeyInfo (for XAdES) encapsulated elementsprotected abstract List<eu.europa.esig.dss.spi.x509.revocation.ocsp.OCSPRef> getOCSPRefs(SA unsignedAttribute) Returns a list of OCSP revocation refs from the givenunsignedAttributeprotected eu.europa.esig.dss.spi.x509.tsp.TimestampedReferenceCreates a timestamped reference for the current signatureprotected List<eu.europa.esig.dss.spi.x509.tsp.TimestampedReference> Returns a list of allTimestampedReferences found into CMS SignedData of the signature NOTE: used only in ASiC-E CAdESprotected List<eu.europa.esig.dss.spi.x509.tsp.TimestampedReference> Returns a list ofTimestampedReferencefor a "signature-timestamp" elementList<eu.europa.esig.dss.spi.x509.tsp.TimestampToken> Returns a list of incorporated signature timestampsprotected SignatureProperties<SA> Returns the 'signed-signature-properties' element of the signatureList<eu.europa.esig.dss.spi.x509.tsp.TimestampedReference> Returns a list ofTimestampedReferences obtained from thesignatureScopesprotected List<eu.europa.esig.dss.spi.x509.tsp.TimestampedReference> Returns a list ofTimestampedReferences created from signing certificates of the signatureeu.europa.esig.dss.spi.x509.ListCertificateSourceReturns a mergedListCertificateSourceof all embedded timestamp certificate sourceseu.europa.esig.dss.spi.x509.ListCertificateSourceReturns a mergedListCertificateSourceof all embedded timestamp certificate sources except the latest Archive Timestampeu.europa.esig.dss.spi.x509.revocation.ListRevocationSource<eu.europa.esig.dss.model.x509.revocation.crl.CRL> Returns a mergedListRevocationSourceof all embedded timestamp CRL sourcesprotected List<eu.europa.esig.dss.spi.x509.tsp.TimestampedReference> getTimestampedCertificateRefs(SA unsignedAttribute) Returns a list ofTimestampedReferencecertificate refs found in the givenunsignedAttributeprotected List<eu.europa.esig.dss.spi.x509.tsp.TimestampedReference> getTimestampedCertificateValues(SA unsignedAttribute) Returns a list ofTimestampedReferences from theunsignedAttributecontaining certificate valuesprotected List<eu.europa.esig.dss.spi.x509.tsp.TimestampedReference> getTimestampedRevocationRefs(SA unsignedAttribute) Returns a list ofTimestampedReferencerevocation refs found in the givenunsignedAttributeprotected List<eu.europa.esig.dss.spi.x509.tsp.TimestampedReference> getTimestampedRevocationValues(SA unsignedAttribute) Returns a list of timestamped revocation references extracted from the given unsigned attributeprotected abstract TimestampMessageDigestBuildergetTimestampMessageImprintDigestBuilder(eu.europa.esig.dss.enumerations.DigestAlgorithm digestAlgorithm) Returns aTimestampMessageDigestBuilderto compute message digest with the providedDigestAlgorithmprotected abstract TimestampMessageDigestBuildergetTimestampMessageImprintDigestBuilder(eu.europa.esig.dss.spi.x509.tsp.TimestampToken timestampToken) Returns a relatedTimestampMessageDigestBuildereu.europa.esig.dss.spi.x509.revocation.ListRevocationSource<eu.europa.esig.dss.model.x509.revocation.ocsp.OCSP> Returns a mergedListRevocationSourceof all embedded timestamp OCSP sourcesprotected List<eu.europa.esig.dss.model.scope.SignatureScope> getTimestampScopes(eu.europa.esig.dss.spi.x509.tsp.TimestampToken timestampToken) Generates timestamp token scopesList<eu.europa.esig.dss.spi.x509.tsp.TimestampToken> Returns a list of incorporated SigAndRefs timestampsList<eu.europa.esig.dss.spi.x509.tsp.TimestampToken> Returns a list of incorporated RefsOnly timestampsprotected List<eu.europa.esig.dss.spi.x509.tsp.TimestampedReference> getTimestampValidationData(SA unsignedAttribute) Returns a list ofTimestampedReferences encapsulated to the "timestamp-validation-data"unsignedAttributeList<eu.europa.esig.dss.spi.x509.tsp.TimestampedReference> Returns a list ofTimestampedReferences for all tokens embedded into unsigned properties of the signatureprotected SignatureProperties<SA> Returns the 'unsigned-signature-properties' element of the signatureprotected voidincorporateArchiveTimestampReferences(eu.europa.esig.dss.spi.x509.tsp.TimestampToken timestampToken, List<eu.europa.esig.dss.spi.x509.tsp.TimestampToken> previousTimestamps) The method incorporates all the timestamped references for the given archivetimestampTokenprotected abstract booleanisAllDataObjectsTimestamp(SA signedAttribute) Determines if the givensignedAttributeis an instance of "data-objects-timestamp" element NOTE: Applicable only for XAdESprotected abstract booleanisArchiveTimestamp(SA unsignedAttribute) Determines if the givenunsignedAttributeis an instance of "archive-timestamp" elementprotected abstract booleanisAttrAuthoritiesCertValues(SA unsignedAttribute) Determines if the givenunsignedAttributeis an instance of "AttrAuthoritiesCertValues" elementprotected abstract booleanisAttributeCertificateRef(SA unsignedAttribute) Determines if the givenunsignedAttributeis an instance of "attribute-certificate-ref" elementprotected abstract booleanisAttributeRevocationRef(SA unsignedAttribute) Determines if the givenunsignedAttributeis an instance of "attribute-revocation-ref" elementprotected abstract booleanisAttributeRevocationValues(SA unsignedAttribute) Determines if the givenunsignedAttributeis an instance of "AttributeRevocationValues" elementprotected abstract booleanisCertificateValues(SA unsignedAttribute) Determines if the givenunsignedAttributeis an instance of "certificate-values" elementprotected abstract booleanisCompleteCertificateRef(SA unsignedAttribute) Determines if the givenunsignedAttributeis an instance of "complete-certificate-ref" elementprotected abstract booleanisCompleteRevocationRef(SA unsignedAttribute) Determines if the givenunsignedAttributeis an instance of "complete-revocation-ref" elementprotected abstract booleanisContentTimestamp(SA signedAttribute) Determines if the givensignedAttributeis an instance of "content-timestamp" element NOTE: Applicable only for CAdESprotected abstract booleanisCounterSignature(SA unsignedAttribute) Determines if the givenunsignedAttributeis an instance of "counter-signature" elementprotected abstract booleanisEvidenceRecord(SA unsignedAttribute) Determines if the givenunsignedAttributeis an instance of "evidence-record" elementprotected abstract booleanisIndividualDataObjectsTimestamp(SA signedAttribute) Determines if the givensignedAttributeis an instance of "individual-data-objects-timestamp" element NOTE: Applicable only for XAdESprotected abstract booleanisRefsOnlyTimestamp(SA unsignedAttribute) Determines if the givenunsignedAttributeis an instance of "refs-only-timestamp" elementprotected abstract booleanisRevocationValues(SA unsignedAttribute) Determines if the givenunsignedAttributeis an instance of "revocation-values" elementprotected abstract booleanisSigAndRefsTimestamp(SA unsignedAttribute) Determines if the givenunsignedAttributeis an instance of "sig-and-refs-timestamp" elementprotected abstract booleanisSignaturePolicyStore(SA unsignedAttribute) Determines if the givenunsignedAttributeis an instance of "signature-policy-store" elementprotected abstract booleanisSignatureTimestamp(SA unsignedAttribute) Determines if the givenunsignedAttributeis an instance of "signature-timestamp" elementbooleanisTimestamped(String tokenId, eu.europa.esig.dss.enumerations.TimestampedObjectType objectType) Checks if a tokenId with the given Id is covered by the timestamp sourceprotected abstract booleanisTimeStampValidationData(SA unsignedAttribute) Determines if the givenunsignedAttributeis an instance of "timestamp-validation-data" elementprotected abstract List<EvidenceRecord> makeEvidenceRecords(SA signatureAttribute, List<eu.europa.esig.dss.spi.x509.tsp.TimestampedReference> references) Creates a list of evidence records from the providedsignatureAttributeprotected abstract eu.europa.esig.dss.spi.x509.tsp.TimestampTokenmakeTimestampToken(SA signatureAttribute, eu.europa.esig.dss.enumerations.TimestampType timestampType, List<eu.europa.esig.dss.spi.x509.tsp.TimestampedReference> references) Creates a timestamp token from the providedsignatureAttributeprotected voidPopulates all the lists by data found into the signatureprotected List<eu.europa.esig.dss.spi.x509.tsp.TimestampToken> makeTimestampTokens(SA signatureAttribute, eu.europa.esig.dss.enumerations.TimestampType timestampType) Creates timestamp tokens from the providedsignatureAttributeprotected List<eu.europa.esig.dss.spi.x509.tsp.TimestampToken> makeTimestampTokens(SA signatureAttribute, eu.europa.esig.dss.enumerations.TimestampType timestampType, List<eu.europa.esig.dss.spi.x509.tsp.TimestampedReference> references) Creates timestamp tokens from the providedsignatureAttributewith a given list ofTimestampedReferencesprotected voidCreates TimestampTokens from all instances extracted from signed attributes (content TSTs)protected voidCreates TimestampTokens from found instances in unsigned propertiesprotected voidpopulateSources(eu.europa.esig.dss.spi.x509.tsp.TimestampToken timestampToken) Allows to populate all merged sources with extracted from a timestamp dataprotected voidpopulateSources(EvidenceRecord externalEvidenceRecord) Allows to populate all sources from an external evidence recordprotected voidpopulateSources(List<eu.europa.esig.dss.spi.x509.tsp.TimestampToken> timestampTokens) Allows to populate all merged sources with extracted from a timestamp dataprotected voidValidates list of all timestamps present in the sourceMethods inherited from class eu.europa.esig.dss.validation.timestamp.AbstractTimestampSource
addReference, addReference, addReferences, createReferenceForCertificate, createReferenceForIdentifier, createReferencesForCertificateRefs, createReferencesForCertificates, createReferencesForCRLBinaries, createReferencesForCRLRefs, createReferencesForIdentifiers, createReferencesForOCSPBinaries, createReferencesForOCSPBinary, createReferencesForOCSPRefs, getEncapsulatedValuesFromTimestamp, getReferencesFromTimestamp, getSignerDataTimestampedReferences
-
Field Details
-
signature
The signature is being validated -
crlSource
protected eu.europa.esig.dss.spi.x509.revocation.ListRevocationSource<eu.europa.esig.dss.model.x509.revocation.crl.CRL> crlSourceCRL revocation source containing merged data from signature and timestamps -
ocspSource
protected eu.europa.esig.dss.spi.x509.revocation.ListRevocationSource<eu.europa.esig.dss.model.x509.revocation.ocsp.OCSP> ocspSourceOCSP revocation source containing merged data from signature and timestamps -
certificateSource
protected eu.europa.esig.dss.spi.x509.ListCertificateSource certificateSourceCertificateSource containing merged data from signature and timestamps -
contentTimestamps
Enclosed content timestamps. -
signatureTimestamps
Enclosed signature timestamps. -
sigAndRefsTimestamps
Enclosed SignAndRefs timestamps. -
refsOnlyTimestamps
Enclosed RefsOnly timestamps. -
archiveTimestamps
This variable contains the list of enclosed archive signature timestamps. -
detachedTimestamps
This variable contains the list of detached timestamp tokens (used in ASiC with CAdES). -
embeddedEvidenceRecords
This variable contains the list of evidence records embedded to the signature document. -
detachedEvidenceRecords
This variable contains the list of evidence records detached from the signature document. -
unsignedPropertiesReferences
protected transient List<eu.europa.esig.dss.spi.x509.tsp.TimestampedReference> unsignedPropertiesReferencesA list of all TimestampedReferences extracted from a signature
-
-
Constructor Details
-
SignatureTimestampSource
Default constructor- Parameters:
signature-AdvancedSignatureis being validated
-
-
Method Details
-
getContentTimestamps
Description copied from interface:TimestampSourceReturns a list of incorporated content timestamps- Specified by:
getContentTimestampsin interfaceTimestampSource- Returns:
- a list of
TimestampTokens
-
getSignatureTimestamps
Description copied from interface:TimestampSourceReturns a list of incorporated signature timestamps- Specified by:
getSignatureTimestampsin interfaceTimestampSource- Returns:
- a list of
TimestampTokens
-
getTimestampsX1
Description copied from interface:TimestampSourceReturns a list of incorporated SigAndRefs timestamps- Specified by:
getTimestampsX1in interfaceTimestampSource- Returns:
- a list of
TimestampTokens
-
getTimestampsX2
Description copied from interface:TimestampSourceReturns a list of incorporated RefsOnly timestamps- Specified by:
getTimestampsX2in interfaceTimestampSource- Returns:
- a list of
TimestampTokens
-
getArchiveTimestamps
Description copied from interface:TimestampSourceReturns a list of incorporated archive timestamps- Specified by:
getArchiveTimestampsin interfaceTimestampSource- Returns:
- a list of
TimestampTokens
-
getDocumentTimestamps
Description copied from interface:TimestampSourceReturns a list of incorporated document timestamps (PAdES only)- Specified by:
getDocumentTimestampsin interfaceTimestampSource- Returns:
- a list of
TimestampTokens
-
getDetachedTimestamps
Description copied from interface:TimestampSourceReturns a list of detached timestamps (used in ASiC with CAdES)- Specified by:
getDetachedTimestampsin interfaceTimestampSource- Returns:
- a list of
TimestampTokens
-
getAllTimestamps
Description copied from interface:TimestampSourceReturns a list of all incorporated timestamps- Specified by:
getAllTimestampsin interfaceTimestampSource- Returns:
- a list of
TimestampTokens
-
getEmbeddedEvidenceRecords
Description copied from interface:TimestampSourceReturns a list of evidence records embedded to a signature document- Specified by:
getEmbeddedEvidenceRecordsin interfaceTimestampSource- Returns:
- a list of
EvidenceRecords
-
getDetachedEvidenceRecords
Description copied from interface:TimestampSourceReturns a list of evidence records detached from a signature document- Specified by:
getDetachedEvidenceRecordsin interfaceTimestampSource- Returns:
- a list of
EvidenceRecords
-
getAllEvidenceRecords
Description copied from interface:TimestampSourceReturns a list of all evidence records associated with the signature- Specified by:
getAllEvidenceRecordsin interfaceTimestampSource- Returns:
- a list of
EvidenceRecords
-
getTimestampCertificateSources
public eu.europa.esig.dss.spi.x509.ListCertificateSource getTimestampCertificateSources()Description copied from interface:TimestampSourceReturns a mergedListCertificateSourceof all embedded timestamp certificate sources- Specified by:
getTimestampCertificateSourcesin interfaceTimestampSource- Returns:
ListCertificateSource
-
getTimestampCertificateSourcesExceptLastArchiveTimestamp
public eu.europa.esig.dss.spi.x509.ListCertificateSource getTimestampCertificateSourcesExceptLastArchiveTimestamp()Description copied from interface:TimestampSourceReturns a mergedListCertificateSourceof all embedded timestamp certificate sources except the latest Archive Timestamp- Specified by:
getTimestampCertificateSourcesExceptLastArchiveTimestampin interfaceTimestampSource- Returns:
ListCertificateSource
-
getAllTimestampsExceptLastArchiveTimestamp
public List<eu.europa.esig.dss.spi.x509.tsp.TimestampToken> getAllTimestampsExceptLastArchiveTimestamp()Description copied from interface:TimestampSourceReturns a list of allTimestampTokens except the last archive timestamp- Specified by:
getAllTimestampsExceptLastArchiveTimestampin interfaceTimestampSource- Returns:
- a list of
TimestampTokens
-
getTimestampCRLSources
public eu.europa.esig.dss.spi.x509.revocation.ListRevocationSource<eu.europa.esig.dss.model.x509.revocation.crl.CRL> getTimestampCRLSources()Description copied from interface:TimestampSourceReturns a mergedListRevocationSourceof all embedded timestamp CRL sources- Specified by:
getTimestampCRLSourcesin interfaceTimestampSource- Returns:
ListRevocationSource
-
getTimestampOCSPSources
public eu.europa.esig.dss.spi.x509.revocation.ListRevocationSource<eu.europa.esig.dss.model.x509.revocation.ocsp.OCSP> getTimestampOCSPSources()Description copied from interface:TimestampSourceReturns a mergedListRevocationSourceof all embedded timestamp OCSP sources- Specified by:
getTimestampOCSPSourcesin interfaceTimestampSource- Returns:
ListRevocationSource
-
getUnsignedPropertiesReferences
Description copied from interface:TimestampSourceReturns a list ofTimestampedReferences for all tokens embedded into unsigned properties of the signature- Specified by:
getUnsignedPropertiesReferencesin interfaceTimestampSource- Returns:
- a list of
TimestampedReferences
-
createAndValidate
protected void createAndValidate()Creates and validates all timestamps Must be called only once -
addExternalTimestamp
public void addExternalTimestamp(eu.europa.esig.dss.spi.x509.tsp.TimestampToken timestamp) Description copied from interface:TimestampSourceThis method allows to add an external timestamp. The given timestamp must be processed before.- Specified by:
addExternalTimestampin interfaceTimestampSource- Parameters:
timestamp-TimestampTokenthe timestamp token
-
addExternalEvidenceRecord
Description copied from interface:TimestampSourceThis method allows to add an external evidence record. The given evidence record must be processed before.- Specified by:
addExternalEvidenceRecordin interfaceTimestampSource- Parameters:
evidenceRecord-EvidenceRecordthe evidence record covering the signature file
-
makeTimestampTokens
protected void makeTimestampTokens()Populates all the lists by data found into the signature -
makeTimestampTokensFromSignedAttributes
protected void makeTimestampTokensFromSignedAttributes()Creates TimestampTokens from all instances extracted from signed attributes (content TSTs) -
makeTimestampTokensFromUnsignedAttributes
protected void makeTimestampTokensFromUnsignedAttributes()Creates TimestampTokens from found instances in unsigned properties -
getSignedSignatureProperties
Returns the 'signed-signature-properties' element of the signature- Returns:
SignatureProperties
-
buildSignedSignatureProperties
Creates the 'signed-signature-properties' element of the signature- Returns:
SignatureProperties
-
getUnsignedSignatureProperties
Returns the 'unsigned-signature-properties' element of the signature- Returns:
SignatureProperties
-
buildUnsignedSignatureProperties
Creates the 'unsigned-signature-properties' element of the signature- Returns:
SignatureProperties
-
isContentTimestamp
Determines if the givensignedAttributeis an instance of "content-timestamp" element NOTE: Applicable only for CAdES- Parameters:
signedAttribute-SignatureAttributeto process- Returns:
- TRUE if the
unsignedAttributeis a Data Objects Timestamp, FALSE otherwise
-
isAllDataObjectsTimestamp
Determines if the givensignedAttributeis an instance of "data-objects-timestamp" element NOTE: Applicable only for XAdES- Parameters:
signedAttribute-SignatureAttributeto process- Returns:
- TRUE if the
unsignedAttributeis a Data Objects Timestamp, FALSE otherwise
-
isIndividualDataObjectsTimestamp
Determines if the givensignedAttributeis an instance of "individual-data-objects-timestamp" element NOTE: Applicable only for XAdES- Parameters:
signedAttribute-SignatureAttributeto process- Returns:
- TRUE if the
unsignedAttributeis a Data Objects Timestamp, FALSE otherwise
-
isSignatureTimestamp
Determines if the givenunsignedAttributeis an instance of "signature-timestamp" element- Parameters:
unsignedAttribute-SignatureAttributeto process- Returns:
- TRUE if the
unsignedAttributeis a Signature Timestamp, FALSE otherwise
-
isCompleteCertificateRef
Determines if the givenunsignedAttributeis an instance of "complete-certificate-ref" element- Parameters:
unsignedAttribute-SignatureAttributeto process- Returns:
- TRUE if the
unsignedAttributeis a Complete Certificate Ref, FALSE otherwise
-
isAttributeCertificateRef
Determines if the givenunsignedAttributeis an instance of "attribute-certificate-ref" element- Parameters:
unsignedAttribute-SignatureAttributeto process- Returns:
- TRUE if the
unsignedAttributeis an Attribute Certificate Ref, FALSE otherwise
-
isCompleteRevocationRef
Determines if the givenunsignedAttributeis an instance of "complete-revocation-ref" element- Parameters:
unsignedAttribute-SignatureAttributeto process- Returns:
- TRUE if the
unsignedAttributeis a Complete Revocation Ref, FALSE otherwise
-
isAttributeRevocationRef
Determines if the givenunsignedAttributeis an instance of "attribute-revocation-ref" element- Parameters:
unsignedAttribute-SignatureAttributeto process- Returns:
- TRUE if the
unsignedAttributeis an Attribute Revocation Ref, FALSE otherwise
-
isRefsOnlyTimestamp
Determines if the givenunsignedAttributeis an instance of "refs-only-timestamp" element- Parameters:
unsignedAttribute-SignatureAttributeto process- Returns:
- TRUE if the
unsignedAttributeis a Refs Only TimeStamp, FALSE otherwise
-
isSigAndRefsTimestamp
Determines if the givenunsignedAttributeis an instance of "sig-and-refs-timestamp" element- Parameters:
unsignedAttribute-SignatureAttributeto process- Returns:
- TRUE if the
unsignedAttributeis a Sig And Refs TimeStamp, FALSE otherwise
-
isCertificateValues
Determines if the givenunsignedAttributeis an instance of "certificate-values" element- Parameters:
unsignedAttribute-SignatureAttributeto process- Returns:
- TRUE if the
unsignedAttributeis a Certificate Values, FALSE otherwise
-
isRevocationValues
Determines if the givenunsignedAttributeis an instance of "revocation-values" element- Parameters:
unsignedAttribute-SignatureAttributeto process- Returns:
- TRUE if the
unsignedAttributeis a Revocation Values, FALSE otherwise
-
isAttrAuthoritiesCertValues
Determines if the givenunsignedAttributeis an instance of "AttrAuthoritiesCertValues" element- Parameters:
unsignedAttribute-SignatureAttributeto process- Returns:
- TRUE if the
unsignedAttributeis an AttrAuthoritiesCertValues, FALSE otherwise
-
isAttributeRevocationValues
Determines if the givenunsignedAttributeis an instance of "AttributeRevocationValues" element- Parameters:
unsignedAttribute-SignatureAttributeto process- Returns:
- TRUE if the
unsignedAttributeis an AttributeRevocationValues, FALSE otherwise
-
isArchiveTimestamp
Determines if the givenunsignedAttributeis an instance of "archive-timestamp" element- Parameters:
unsignedAttribute-SignatureAttributeto process- Returns:
- TRUE if the
unsignedAttributeis an Archive TimeStamp, FALSE otherwise
-
isTimeStampValidationData
Determines if the givenunsignedAttributeis an instance of "timestamp-validation-data" element- Parameters:
unsignedAttribute-SignatureTimestampSourceto process- Returns:
- TRUE if the
unsignedAttributeis a TimeStamp Validation Data, FALSE otherwise
-
isCounterSignature
Determines if the givenunsignedAttributeis an instance of "counter-signature" element- Parameters:
unsignedAttribute-SignatureTimestampSourceto process- Returns:
- TRUE if the
unsignedAttributeis a Counter signature, FALSE otherwise
-
isSignaturePolicyStore
Determines if the givenunsignedAttributeis an instance of "signature-policy-store" element- Parameters:
unsignedAttribute-SignatureTimestampSourceto process- Returns:
- TRUE if the
unsignedAttributeis a Counter signature, FALSE otherwise
-
isEvidenceRecord
Determines if the givenunsignedAttributeis an instance of "evidence-record" element- Parameters:
unsignedAttribute-SignatureTimestampSourceto process- Returns:
- TRUE if the
unsignedAttributeis an evidence record, FALSE otherwise
-
makeTimestampToken
protected abstract eu.europa.esig.dss.spi.x509.tsp.TimestampToken makeTimestampToken(SA signatureAttribute, eu.europa.esig.dss.enumerations.TimestampType timestampType, List<eu.europa.esig.dss.spi.x509.tsp.TimestampedReference> references) Creates a timestamp token from the providedsignatureAttribute- Parameters:
signatureAttribute-SignatureAttributeto create timestamp fromtimestampType- a targetTimestampTypereferences- list ofTimestampedReferences covered by the current timestamp- Returns:
TimestampToken
-
makeTimestampTokens
protected List<eu.europa.esig.dss.spi.x509.tsp.TimestampToken> makeTimestampTokens(SA signatureAttribute, eu.europa.esig.dss.enumerations.TimestampType timestampType) Creates timestamp tokens from the providedsignatureAttribute- Parameters:
signatureAttribute-SignatureAttributeto create timestamp fromtimestampType- a targetTimestampType- Returns:
- a list of
TimestampTokens
-
makeTimestampTokens
protected List<eu.europa.esig.dss.spi.x509.tsp.TimestampToken> makeTimestampTokens(SA signatureAttribute, eu.europa.esig.dss.enumerations.TimestampType timestampType, List<eu.europa.esig.dss.spi.x509.tsp.TimestampedReference> references) Creates timestamp tokens from the providedsignatureAttributewith a given list ofTimestampedReferences- Parameters:
signatureAttribute-SignatureAttributeto create timestamp fromtimestampType- a targetTimestampTypereferences- list ofTimestampedReferences covered by the current timestamp- Returns:
- a list of
TimestampTokens
-
makeEvidenceRecords
protected abstract List<EvidenceRecord> makeEvidenceRecords(SA signatureAttribute, List<eu.europa.esig.dss.spi.x509.tsp.TimestampedReference> references) Creates a list of evidence records from the providedsignatureAttribute- Parameters:
signatureAttribute-SignatureAttributeto create evidence records fromreferences- list ofTimestampedReferences covered by the current evidence record(s)- Returns:
- a list of
EvidenceRecords
-
getSignerDataReferences
Description copied from interface:TimestampSourceReturns a list ofTimestampedReferences obtained from thesignatureScopes- Specified by:
getSignerDataReferencesin interfaceTimestampSource- Returns:
- list of
TimestampedReferences
-
getSignatureTimestampReferences
protected List<eu.europa.esig.dss.spi.x509.tsp.TimestampedReference> getSignatureTimestampReferences()Returns a list ofTimestampedReferencefor a "signature-timestamp" element- Returns:
- list of
TimestampedReferences
-
getSignatureReference
protected eu.europa.esig.dss.spi.x509.tsp.TimestampedReference getSignatureReference()Creates a timestamped reference for the current signature- Returns:
TimestampedReference
-
getEncapsulatedReferencesFromTimestamps
protected List<eu.europa.esig.dss.spi.x509.tsp.TimestampedReference> getEncapsulatedReferencesFromTimestamps(List<eu.europa.esig.dss.spi.x509.tsp.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
-
getSigningCertificateTimestampReferences
protected List<eu.europa.esig.dss.spi.x509.tsp.TimestampedReference> getSigningCertificateTimestampReferences()Returns a list ofTimestampedReferences created from signing certificates of the signature- Returns:
- list of
TimestampedReferences
-
getKeyInfoReferences
Returns references from the KeyInfo (for XAdES) encapsulated elements- Returns:
- list of
TimestampedReferences
-
getTimestampedCertificateRefs
protected List<eu.europa.esig.dss.spi.x509.tsp.TimestampedReference> getTimestampedCertificateRefs(SA unsignedAttribute) Returns a list ofTimestampedReferencecertificate refs found in the givenunsignedAttribute- Parameters:
unsignedAttribute-SignatureTimestampSourceto find references from- Returns:
- list of
TimestampedReferences
-
getCertificateRefs
protected abstract List<eu.europa.esig.dss.spi.x509.CertificateRef> getCertificateRefs(SA unsignedAttribute) Returns a list ofCertificateRefs from the givenunsignedAttribute- Parameters:
unsignedAttribute-SignatureTimestampSourceto get certRefs from- Returns:
- list of
CertificateRefs
-
getTimestampedRevocationRefs
protected List<eu.europa.esig.dss.spi.x509.tsp.TimestampedReference> getTimestampedRevocationRefs(SA unsignedAttribute) Returns a list ofTimestampedReferencerevocation refs found in the givenunsignedAttribute- Parameters:
unsignedAttribute-SignatureTimestampSourceto find references from- Returns:
- list of
TimestampedReferences
-
getCRLRefs
protected abstract List<eu.europa.esig.dss.spi.x509.revocation.crl.CRLRef> getCRLRefs(SA unsignedAttribute) Returns a list of CRL revocation refs from the givenunsignedAttribute- Parameters:
unsignedAttribute-SignatureTimestampSourceto get CRLRef- Returns:
- list of
CRLRefs
-
getOCSPRefs
protected abstract List<eu.europa.esig.dss.spi.x509.revocation.ocsp.OCSPRef> getOCSPRefs(SA unsignedAttribute) Returns a list of OCSP revocation refs from the givenunsignedAttribute- Parameters:
unsignedAttribute-SignatureTimestampSourceto get OCSPRefs from- Returns:
- list of
OCSPRefs
-
getTimestampedCertificateValues
protected List<eu.europa.esig.dss.spi.x509.tsp.TimestampedReference> getTimestampedCertificateValues(SA unsignedAttribute) Returns a list ofTimestampedReferences from theunsignedAttributecontaining certificate values- Parameters:
unsignedAttribute-SignatureTimestampSourceto extract certificate values from- Returns:
- a list of
TimestampedReferences
-
getEncapsulatedCertificateIdentifiers
protected abstract List<eu.europa.esig.dss.model.identifier.Identifier> getEncapsulatedCertificateIdentifiers(SA unsignedAttribute) Returns a list ofIdentifiers obtained from the givenunsignedAttribute- Parameters:
unsignedAttribute-SignatureTimestampSourceto get certificate identifiers from- Returns:
- list of
Identifiers
-
getTimestampedRevocationValues
protected List<eu.europa.esig.dss.spi.x509.tsp.TimestampedReference> getTimestampedRevocationValues(SA unsignedAttribute) Returns a list of timestamped revocation references extracted from the given unsigned attribute- Parameters:
unsignedAttribute-SignatureTimestampSourcecontaining revocation data- Returns:
- a list of
TimestampedReferences
-
getEncapsulatedCRLIdentifiers
protected abstract List<eu.europa.esig.dss.crl.CRLBinary> getEncapsulatedCRLIdentifiers(SA unsignedAttribute) Returns a list ofCRLBinarys obtained from the givenunsignedAttribute- Parameters:
unsignedAttribute-SignatureTimestampSourceto get CRL identifiers from- Returns:
- list of
CRLBinarys
-
getEncapsulatedOCSPIdentifiers
protected abstract List<eu.europa.esig.dss.spi.x509.revocation.ocsp.OCSPResponseBinary> getEncapsulatedOCSPIdentifiers(SA unsignedAttribute) Returns a list ofOCSPResponseBinarys obtained from the givenunsignedAttribute- Parameters:
unsignedAttribute-SignatureTimestampSourceto get OCSP identifiers from- Returns:
- list of
OCSPResponseBinarys
-
incorporateArchiveTimestampReferences
protected void incorporateArchiveTimestampReferences(eu.europa.esig.dss.spi.x509.tsp.TimestampToken timestampToken, List<eu.europa.esig.dss.spi.x509.tsp.TimestampToken> previousTimestamps) The method incorporates all the timestamped references for the given archivetimestampToken- Parameters:
timestampToken-TimestampTokenrepresenting an Archive TST to add references intopreviousTimestamps- a list of previously createdTimestampTokens
-
getArchiveTimestampReferences
protected List<eu.europa.esig.dss.spi.x509.tsp.TimestampedReference> getArchiveTimestampReferences(List<eu.europa.esig.dss.spi.x509.tsp.TimestampToken> previousTimestamps) Returns a list of time-stamped references for an archival time-stamp- Parameters:
previousTimestamps- a list of previousTimestampTokens- Returns:
- a list of
TimestampedReferences
-
getSignatureSignedDataReferences
protected List<eu.europa.esig.dss.spi.x509.tsp.TimestampedReference> getSignatureSignedDataReferences()Returns a list of allTimestampedReferences found into CMS SignedData of the signature NOTE: used only in ASiC-E CAdES- Returns:
- list of
TimestampedReferences
-
getTimestampValidationData
protected List<eu.europa.esig.dss.spi.x509.tsp.TimestampedReference> getTimestampValidationData(SA unsignedAttribute) Returns a list ofTimestampedReferences encapsulated to the "timestamp-validation-data"unsignedAttribute- Parameters:
unsignedAttribute-SignatureTimestampSourceto get timestamped references from- Returns:
- list of
TimestampedReferences
-
getCounterSignaturesReferences
protected List<eu.europa.esig.dss.spi.x509.tsp.TimestampedReference> getCounterSignaturesReferences(List<AdvancedSignature> counterSignatures) Returns a list ofTimestampedReferences encapsulated from the list of counter signatures- Parameters:
counterSignatures- a list ofAdvancedSignatureto get timestamped references from- Returns:
- list of
TimestampedReferences
-
getCounterSignatureReferences
protected List<eu.europa.esig.dss.spi.x509.tsp.TimestampedReference> getCounterSignatureReferences(AdvancedSignature counterSignature) Returns a list of references extracted from a counter signature- Parameters:
counterSignature-AdvancedSignaturerepresenting a counter signature- Returns:
- a list of
TimestampedReferences
-
getCounterSignatures
Extracts Counter Signatures from the givenunsignedAttribute- Parameters:
unsignedAttribute-SignatureTimestampSourcecontaining counter signatures- Returns:
- a list of
AdvancedSignaturecontaining counter signatures
-
getArchiveTimestampType
protected abstract eu.europa.esig.dss.enumerations.ArchiveTimestampType getArchiveTimestampType(SA unsignedAttribute) ReturnsArchiveTimestampTypefor the givenunsignedAttribute- Parameters:
unsignedAttribute-SignatureTimestampSourceto get archive timestamp type for- Returns:
ArchiveTimestampType
-
validateTimestamps
protected void validateTimestamps()Validates list of all timestamps present in the source -
getTimestampMessageImprintDigestBuilder
protected abstract TimestampMessageDigestBuilder getTimestampMessageImprintDigestBuilder(eu.europa.esig.dss.enumerations.DigestAlgorithm digestAlgorithm) Returns aTimestampMessageDigestBuilderto compute message digest with the providedDigestAlgorithm- Parameters:
digestAlgorithm-DigestAlgorithmto use for message-digest computation- Returns:
TimestampMessageDigestBuilder
-
getTimestampMessageImprintDigestBuilder
protected abstract TimestampMessageDigestBuilder getTimestampMessageImprintDigestBuilder(eu.europa.esig.dss.spi.x509.tsp.TimestampToken timestampToken) Returns a relatedTimestampMessageDigestBuilder- Parameters:
timestampToken-TimestampTokento get message-imprint digest builder for- Returns:
TimestampMessageDigestBuilder
-
getTimestampScopes
protected List<eu.europa.esig.dss.model.scope.SignatureScope> getTimestampScopes(eu.europa.esig.dss.spi.x509.tsp.TimestampToken timestampToken) Generates timestamp token scopes- Parameters:
timestampToken-TimestampTokento get timestamp sources for- Returns:
- a list of
SignatureScopes
-
populateSources
protected void populateSources(List<eu.europa.esig.dss.spi.x509.tsp.TimestampToken> timestampTokens) Allows to populate all merged sources with extracted from a timestamp data- Parameters:
timestampTokens- a list ofTimestampTokens to populate data from
-
populateSources
protected void populateSources(eu.europa.esig.dss.spi.x509.tsp.TimestampToken timestampToken) 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
-
isTimestamped
public boolean isTimestamped(String tokenId, eu.europa.esig.dss.enumerations.TimestampedObjectType objectType) Description copied from interface:TimestampSourceChecks if a tokenId with the given Id is covered by the timestamp source- Specified by:
isTimestampedin interfaceTimestampSource- Parameters:
tokenId-StringId of the token to checkobjectType-TimestampedObjectTypedefining the type of the token- Returns:
- TRUE if the token if covered by the timestamp source, FALSE otherwise
-
getAttributeOrder
Gets position of thesignatureAttributeeither within signed or unsigned properties- Parameters:
signatureAttribute-SignatureAttributeto search for- Returns:
- position of the attribute within properties, NULL if not found
-