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
-AdvancedSignature
implementationSA
- the correspondingSignatureAttribute
- All Implemented Interfaces:
TimestampSource
,Serializable
- Direct Known Subclasses:
CAdESTimestampSource
,JAdESTimestampSource
,XAdESTimestampSource
public abstract class SignatureTimestampSource<AS extends AdvancedSignature,SA extends SignatureAttribute>
extends AbstractTimestampSource
implements TimestampSource
The timestamp source of a signature
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected List<TimestampToken>
This variable contains the list of enclosed archive signature timestamps.protected ListCertificateSource
CertificateSource containing merged data from signature and timestampsprotected List<TimestampToken>
Enclosed content timestamps.protected ListRevocationSource<CRL>
CRL revocation source containing merged data from signature and timestampsprotected List<TimestampToken>
This variable contains the list of detached timestamp tokens (used in ASiC with CAdES).protected ListRevocationSource<OCSP>
OCSP revocation source containing merged data from signature and timestampsprotected List<TimestampToken>
Enclosed RefsOnly timestamps.protected List<TimestampToken>
Enclosed SignAndRefs timestamps.protected final AS
The signature is being validatedprotected List<TimestampToken>
Enclosed signature timestamps.protected List<TimestampedReference>
A list of all TimestampedReferences extracted from a signature -
Constructor Summary
ModifierConstructorDescriptionprotected
SignatureTimestampSource
(AS signature) Default constructor -
Method Summary
Modifier and TypeMethodDescriptionvoid
addExternalTimestamp
(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 void
Creates and validates all timestamps Must be called only onceReturns a list of all incorporated timestampsReturns a list of allTimestampToken
s except the last archive timestampprotected abstract List<TimestampedReference>
getArchiveTimestampOtherReferences
(TimestampToken timestampToken) Returns a list ofTimestampedReference
s for the given archivetimestampToken
that cannot be extracted from signature attributes (signed or unsigned), depending on its format (signedData for CAdES or, keyInfo for XAdES)Returns a list of incorporated archive timestampsprotected abstract ArchiveTimestampType
getArchiveTimestampType
(SA unsignedAttribute) ReturnsArchiveTimestampType
for the givenunsignedAttribute
protected abstract List<CertificateRef>
getCertificateRefs
(SA unsignedAttribute) Returns a list ofCertificateRef
s from the givenunsignedAttribute
Returns a list of incorporated content timestampsprotected List<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 givenunsignedAttribute
protected List<TimestampedReference>
getCounterSignaturesReferences
(List<AdvancedSignature> counterSignatures) Returns a list ofTimestampedReference
s encapsulated from the list of counter signaturesgetCRLRefs
(SA unsignedAttribute) Returns a list of CRL revocation refs from the givenunsignedAttribute
Returns a list of detached timestamps (used in ASiC with CAdES)Returns a list of incorporated document timestamps (PAdES only)protected abstract List<Identifier>
getEncapsulatedCertificateIdentifiers
(SA unsignedAttribute) Returns a list ofIdentifier
s obtained from the givenunsignedAttribute
getEncapsulatedCRLIdentifiers
(SA unsignedAttribute) Returns a list ofCRLBinary
s obtained from the givenunsignedAttribute
protected abstract List<OCSPResponseBinary>
getEncapsulatedOCSPIdentifiers
(SA unsignedAttribute) Returns a list ofOCSPResponseBinary
s obtained from the givenunsignedAttribute
protected List<TimestampedReference>
getEncapsulatedReferencesFromTimestamps
(List<TimestampToken> timestampTokens) Returns a list of TimestampedReferences for tokens encapsulated within the list of timestampTokensprotected List<TimestampedReference>
Returns references from the KeyInfo (for XAdES) encapsulated elementsgetOCSPRefs
(SA unsignedAttribute) Returns a list of OCSP revocation refs from the givenunsignedAttribute
protected List<TimestampedReference>
Returns a list of allTimestampedReference
s found into CMS SignedData of the signature NOTE: used only in ASiC-E CAdESprotected List<TimestampedReference>
Returns a list ofTimestampedReference
for a "signature-timestamp" elementReturns a list of incorporated signature timestampsprotected SignatureProperties<SA>
Returns the 'signed-signature-properties' element of the signatureReturns a list ofTimestampedReference
s obtained from thesignatureScopes
protected List<TimestampedReference>
getSignerDataTimestampedReferences
(List<SignatureScope> signatureScopes) Creates a list ofTimestampedReference
s from a given list ofSignatureScope
sprotected List<TimestampedReference>
Returns a list ofTimestampedReference
s created from signing certificates of the signatureReturns a mergedListCertificateSource
of all embedded timestamp certificate sourcesReturns a mergedListCertificateSource
of all embedded timestamp certificate sources except the latest Archive TimestampReturns a mergedListRevocationSource
of all embedded timestamp CRL sourcesprotected List<TimestampedReference>
getTimestampedCertificateRefs
(SA unsignedAttribute) Returns a list ofTimestampedReference
certificate refs found in the givenunsignedAttribute
protected List<TimestampedReference>
getTimestampedCertificateValues
(SA unsignedAttribute) Returns a list ofTimestampedReference
s from theunsignedAttribute
containing certificate valuesprotected List<TimestampedReference>
getTimestampedRevocationRefs
(SA unsignedAttribute) Returns a list ofTimestampedReference
revocation refs found in the givenunsignedAttribute
protected List<TimestampedReference>
getTimestampedRevocationValues
(SA unsignedAttribute) Returns a list of timestamped revocation references extracted from the given unsigned attributeprotected abstract TimestampMessageDigestBuilder
getTimestampMessageImprintDigestBuilder
(DigestAlgorithm digestAlgorithm) Returns aTimestampMessageDigestBuilder
to compute message digest with the providedDigestAlgorithm
protected abstract TimestampMessageDigestBuilder
getTimestampMessageImprintDigestBuilder
(TimestampToken timestampToken) Returns a relatedTimestampMessageDigestBuilder
Returns a mergedListRevocationSource
of all embedded timestamp OCSP sourcesReturns a list of incorporated SigAndRefs timestampsReturns a list of incorporated RefsOnly timestampsprotected List<TimestampedReference>
getTimestampValidationData
(SA unsignedAttribute) Returns a list ofTimestampedReference
s encapsulated to the "timestamp-validation-data"unsignedAttribute
Returns a list ofTimestampedReference
s for all tokens embedded into unsigned properties of the signatureprotected SignatureProperties<SA>
Returns the 'unsigned-signature-properties' element of the signatureprotected void
incorporateArchiveTimestampReferences
(TimestampToken timestampToken, List<TimestampToken> previousTimestamps) The method incorporates all the timestamped references for the given archivetimestampToken
protected abstract boolean
isAllDataObjectsTimestamp
(SA signedAttribute) Determines if the givensignedAttribute
is an instance of "data-objects-timestamp" element NOTE: Applicable only for XAdESprotected abstract boolean
isArchiveTimestamp
(SA unsignedAttribute) Determines if the givenunsignedAttribute
is an instance of "archive-timestamp" elementprotected abstract boolean
isAttrAuthoritiesCertValues
(SA unsignedAttribute) Determines if the givenunsignedAttribute
is an instance of "AttrAuthoritiesCertValues" elementprotected abstract boolean
isAttributeCertificateRef
(SA unsignedAttribute) Determines if the givenunsignedAttribute
is an instance of "attribute-certificate-ref" elementprotected abstract boolean
isAttributeRevocationRef
(SA unsignedAttribute) Determines if the givenunsignedAttribute
is an instance of "attribute-revocation-ref" elementprotected abstract boolean
isAttributeRevocationValues
(SA unsignedAttribute) Determines if the givenunsignedAttribute
is an instance of "AttributeRevocationValues" elementprotected abstract boolean
isCertificateValues
(SA unsignedAttribute) Determines if the givenunsignedAttribute
is an instance of "certificate-values" elementprotected abstract boolean
isCompleteCertificateRef
(SA unsignedAttribute) Determines if the givenunsignedAttribute
is an instance of "complete-certificate-ref" elementprotected abstract boolean
isCompleteRevocationRef
(SA unsignedAttribute) Determines if the givenunsignedAttribute
is an instance of "complete-revocation-ref" elementprotected abstract boolean
isContentTimestamp
(SA signedAttribute) Determines if the givensignedAttribute
is an instance of "content-timestamp" element NOTE: Applicable only for CAdESprotected abstract boolean
isCounterSignature
(SA unsignedAttribute) Determines if the givenunsignedAttribute
is an instance of "counter-signature" elementprotected abstract boolean
isIndividualDataObjectsTimestamp
(SA signedAttribute) Determines if the givensignedAttribute
is an instance of "individual-data-objects-timestamp" element NOTE: Applicable only for XAdESprotected abstract boolean
isRefsOnlyTimestamp
(SA unsignedAttribute) Determines if the givenunsignedAttribute
is an instance of "refs-only-timestamp" elementprotected abstract boolean
isRevocationValues
(SA unsignedAttribute) Determines if the givenunsignedAttribute
is an instance of "revocation-values" elementprotected abstract boolean
isSigAndRefsTimestamp
(SA unsignedAttribute) Determines if the givenunsignedAttribute
is an instance of "sig-and-refs-timestamp" elementprotected abstract boolean
isSignaturePolicyStore
(SA unsignedAttribute) Determines if the givenunsignedAttribute
is an instance of "signature-policy-store" elementprotected abstract boolean
isSignatureTimestamp
(SA unsignedAttribute) Determines if the givenunsignedAttribute
is an instance of "signature-timestamp" elementboolean
isTimestamped
(String tokenId, TimestampedObjectType objectType) Checks if a tokenId with the given Id is covered by the timestamp sourceprotected abstract boolean
isTimeStampValidationData
(SA unsignedAttribute) Determines if the givenunsignedAttribute
is an instance of "timestamp-validation-data" elementprotected abstract TimestampToken
makeTimestampToken
(SA signatureAttribute, TimestampType timestampType, List<TimestampedReference> references) Creates a timestamp token from the providedsignatureAttribute
protected void
Populates all the lists by data found into the signatureprotected List<TimestampToken>
makeTimestampTokens
(SA signatureAttribute, TimestampType timestampType) Creates timestamp tokens from the providedsignatureAttribute
protected List<TimestampToken>
makeTimestampTokens
(SA signatureAttribute, TimestampType timestampType, List<TimestampedReference> references) Creates timestamp tokens from the providedsignatureAttribute
with a given list ofTimestampedReference
sprotected void
Creates TimestampTokens from all instances extracted from signed attributes (content TSTs)protected void
Creates TimestampTokens from found instances in unsigned propertiesprotected void
populateSources
(TimestampToken timestampToken) Allows to populate all merged sources with extracted from a timestamp dataprotected void
populateSources
(List<TimestampToken> timestampTokens) Allows to populate all merged sources with extracted from a timestamp dataprotected void
Validates 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
-
Field Details
-
signature
The signature is being 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 -
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). -
unsignedPropertiesReferences
A list of all TimestampedReferences extracted from a signature
-
-
Constructor Details
-
SignatureTimestampSource
Default constructor- Parameters:
signature
-AdvancedSignature
is being validated
-
-
Method Details
-
getContentTimestamps
Description copied from interface:TimestampSource
Returns a list of incorporated content timestamps- Specified by:
getContentTimestamps
in interfaceTimestampSource
- Returns:
- a list of
TimestampToken
s
-
getSignatureTimestamps
Description copied from interface:TimestampSource
Returns a list of incorporated signature timestamps- Specified by:
getSignatureTimestamps
in interfaceTimestampSource
- Returns:
- a list of
TimestampToken
s
-
getTimestampsX1
Description copied from interface:TimestampSource
Returns a list of incorporated SigAndRefs timestamps- Specified by:
getTimestampsX1
in interfaceTimestampSource
- Returns:
- a list of
TimestampToken
s
-
getTimestampsX2
Description copied from interface:TimestampSource
Returns a list of incorporated RefsOnly timestamps- Specified by:
getTimestampsX2
in interfaceTimestampSource
- Returns:
- a list of
TimestampToken
s
-
getArchiveTimestamps
Description copied from interface:TimestampSource
Returns a list of incorporated archive timestamps- Specified by:
getArchiveTimestamps
in interfaceTimestampSource
- Returns:
- a list of
TimestampToken
s
-
getDocumentTimestamps
Description copied from interface:TimestampSource
Returns a list of incorporated document timestamps (PAdES only)- Specified by:
getDocumentTimestamps
in interfaceTimestampSource
- Returns:
- a list of
TimestampToken
s
-
getDetachedTimestamps
Description copied from interface:TimestampSource
Returns a list of detached timestamps (used in ASiC with CAdES)- Specified by:
getDetachedTimestamps
in interfaceTimestampSource
- Returns:
- a list of
TimestampToken
s
-
getAllTimestamps
Description copied from interface:TimestampSource
Returns a list of all incorporated timestamps- Specified by:
getAllTimestamps
in interfaceTimestampSource
- Returns:
- a list of
TimestampToken
s
-
getTimestampCertificateSources
Description copied from interface:TimestampSource
Returns a mergedListCertificateSource
of all embedded timestamp certificate sources- Specified by:
getTimestampCertificateSources
in interfaceTimestampSource
- Returns:
ListCertificateSource
-
getTimestampCertificateSourcesExceptLastArchiveTimestamp
Description copied from interface:TimestampSource
Returns a mergedListCertificateSource
of all embedded timestamp certificate sources except the latest Archive Timestamp- Specified by:
getTimestampCertificateSourcesExceptLastArchiveTimestamp
in interfaceTimestampSource
- Returns:
ListCertificateSource
-
getAllTimestampsExceptLastArchiveTimestamp
Description copied from interface:TimestampSource
Returns a list of allTimestampToken
s except the last archive timestamp- Specified by:
getAllTimestampsExceptLastArchiveTimestamp
in interfaceTimestampSource
- Returns:
- a list of
TimestampToken
s
-
getTimestampCRLSources
Description copied from interface:TimestampSource
Returns a mergedListRevocationSource
of all embedded timestamp CRL sources- Specified by:
getTimestampCRLSources
in interfaceTimestampSource
- Returns:
ListRevocationSource
-
getTimestampOCSPSources
Description copied from interface:TimestampSource
Returns a mergedListRevocationSource
of all embedded timestamp OCSP sources- Specified by:
getTimestampOCSPSources
in interfaceTimestampSource
- Returns:
ListRevocationSource
-
getUnsignedPropertiesReferences
Description copied from interface:TimestampSource
Returns a list ofTimestampedReference
s for all tokens embedded into unsigned properties of the signature- Specified by:
getUnsignedPropertiesReferences
in interfaceTimestampSource
- Returns:
- a list of
TimestampedReference
s
-
createAndValidate
protected void createAndValidate()Creates and validates all timestamps Must be called only once -
addExternalTimestamp
Description copied from interface:TimestampSource
This method allows to add an external timestamp. The given timestamp must be processed before.- Specified by:
addExternalTimestamp
in interfaceTimestampSource
- Parameters:
timestamp
-TimestampToken
the timestamp token
-
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 givensignedAttribute
is an instance of "content-timestamp" element NOTE: Applicable only for CAdES- Parameters:
signedAttribute
-SignatureAttribute
to process- Returns:
- TRUE if the
unsignedAttribute
is a Data Objects Timestamp, FALSE otherwise
-
isAllDataObjectsTimestamp
Determines if the givensignedAttribute
is an instance of "data-objects-timestamp" element NOTE: Applicable only for XAdES- Parameters:
signedAttribute
-SignatureAttribute
to process- Returns:
- TRUE if the
unsignedAttribute
is a Data Objects Timestamp, FALSE otherwise
-
isIndividualDataObjectsTimestamp
Determines if the givensignedAttribute
is an instance of "individual-data-objects-timestamp" element NOTE: Applicable only for XAdES- Parameters:
signedAttribute
-SignatureAttribute
to process- Returns:
- TRUE if the
unsignedAttribute
is a Data Objects Timestamp, FALSE otherwise
-
isSignatureTimestamp
Determines if the givenunsignedAttribute
is an instance of "signature-timestamp" element- Parameters:
unsignedAttribute
-SignatureAttribute
to process- Returns:
- TRUE if the
unsignedAttribute
is a Signature Timestamp, FALSE otherwise
-
isCompleteCertificateRef
Determines if the givenunsignedAttribute
is an instance of "complete-certificate-ref" element- Parameters:
unsignedAttribute
-SignatureAttribute
to process- Returns:
- TRUE if the
unsignedAttribute
is a Complete Certificate Ref, FALSE otherwise
-
isAttributeCertificateRef
Determines if the givenunsignedAttribute
is an instance of "attribute-certificate-ref" element- Parameters:
unsignedAttribute
-SignatureAttribute
to process- Returns:
- TRUE if the
unsignedAttribute
is an Attribute Certificate Ref, FALSE otherwise
-
isCompleteRevocationRef
Determines if the givenunsignedAttribute
is an instance of "complete-revocation-ref" element- Parameters:
unsignedAttribute
-SignatureAttribute
to process- Returns:
- TRUE if the
unsignedAttribute
is a Complete Revocation Ref, FALSE otherwise
-
isAttributeRevocationRef
Determines if the givenunsignedAttribute
is an instance of "attribute-revocation-ref" element- Parameters:
unsignedAttribute
-SignatureAttribute
to process- Returns:
- TRUE if the
unsignedAttribute
is an Attribute Revocation Ref, FALSE otherwise
-
isRefsOnlyTimestamp
Determines if the givenunsignedAttribute
is an instance of "refs-only-timestamp" element- Parameters:
unsignedAttribute
-SignatureAttribute
to process- Returns:
- TRUE if the
unsignedAttribute
is a Refs Only TimeStamp, FALSE otherwise
-
isSigAndRefsTimestamp
Determines if the givenunsignedAttribute
is an instance of "sig-and-refs-timestamp" element- Parameters:
unsignedAttribute
-SignatureAttribute
to process- Returns:
- TRUE if the
unsignedAttribute
is a Sig And Refs TimeStamp, FALSE otherwise
-
isCertificateValues
Determines if the givenunsignedAttribute
is an instance of "certificate-values" element- Parameters:
unsignedAttribute
-SignatureAttribute
to process- Returns:
- TRUE if the
unsignedAttribute
is a Certificate Values, FALSE otherwise
-
isRevocationValues
Determines if the givenunsignedAttribute
is an instance of "revocation-values" element- Parameters:
unsignedAttribute
-SignatureAttribute
to process- Returns:
- TRUE if the
unsignedAttribute
is a Revocation Values, FALSE otherwise
-
isAttrAuthoritiesCertValues
Determines if the givenunsignedAttribute
is an instance of "AttrAuthoritiesCertValues" element- Parameters:
unsignedAttribute
-SignatureAttribute
to process- Returns:
- TRUE if the
unsignedAttribute
is an AttrAuthoritiesCertValues, FALSE otherwise
-
isAttributeRevocationValues
Determines if the givenunsignedAttribute
is an instance of "AttributeRevocationValues" element- Parameters:
unsignedAttribute
-SignatureAttribute
to process- Returns:
- TRUE if the
unsignedAttribute
is an AttributeRevocationValues, FALSE otherwise
-
isArchiveTimestamp
Determines if the givenunsignedAttribute
is an instance of "archive-timestamp" element- Parameters:
unsignedAttribute
-SignatureAttribute
to process- Returns:
- TRUE if the
unsignedAttribute
is an Archive TimeStamp, FALSE otherwise
-
isTimeStampValidationData
Determines if the givenunsignedAttribute
is an instance of "timestamp-validation-data" element- Parameters:
unsignedAttribute
-SignatureTimestampSource
to process- Returns:
- TRUE if the
unsignedAttribute
is a TimeStamp Validation Data, FALSE otherwise
-
isCounterSignature
Determines if the givenunsignedAttribute
is an instance of "counter-signature" element- Parameters:
unsignedAttribute
-SignatureTimestampSource
to process- Returns:
- TRUE if the
unsignedAttribute
is a Counter signature, FALSE otherwise
-
isSignaturePolicyStore
Determines if the givenunsignedAttribute
is an instance of "signature-policy-store" element- Parameters:
unsignedAttribute
-SignatureTimestampSource
to process- Returns:
- TRUE if the
unsignedAttribute
is a Counter signature, FALSE otherwise
-
makeTimestampToken
protected abstract TimestampToken makeTimestampToken(SA signatureAttribute, TimestampType timestampType, List<TimestampedReference> references) Creates a timestamp token from the providedsignatureAttribute
- Parameters:
signatureAttribute
-SignatureAttribute
to create timestamp fromtimestampType
- a targetTimestampType
references
- list ofTimestampedReference
s covered by the current timestamp- Returns:
TimestampToken
-
makeTimestampTokens
protected List<TimestampToken> makeTimestampTokens(SA signatureAttribute, TimestampType timestampType) Creates timestamp tokens from the providedsignatureAttribute
- Parameters:
signatureAttribute
-SignatureAttribute
to create timestamp fromtimestampType
- a targetTimestampType
- Returns:
- a list of
TimestampToken
s
-
makeTimestampTokens
protected List<TimestampToken> makeTimestampTokens(SA signatureAttribute, TimestampType timestampType, List<TimestampedReference> references) Creates timestamp tokens from the providedsignatureAttribute
with a given list ofTimestampedReference
s- Parameters:
signatureAttribute
-SignatureAttribute
to create timestamp fromtimestampType
- a targetTimestampType
references
- list ofTimestampedReference
s covered by the current timestamp- Returns:
- a list of
TimestampToken
s
-
getSignerDataReferences
Description copied from interface:TimestampSource
Returns a list ofTimestampedReference
s obtained from thesignatureScopes
- Specified by:
getSignerDataReferences
in interfaceTimestampSource
- Returns:
- list of
TimestampedReference
s
-
getSignerDataTimestampedReferences
protected List<TimestampedReference> getSignerDataTimestampedReferences(List<SignatureScope> signatureScopes) Creates a list ofTimestampedReference
s from a given list ofSignatureScope
s- Parameters:
signatureScopes
- a list ofSignatureScope
to createTimestampedReference
s for- Returns:
- a list of
TimestampedReference
s
-
getSignatureTimestampReferences
Returns a list ofTimestampedReference
for a "signature-timestamp" element- Returns:
- list of
TimestampedReference
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
-
getSigningCertificateTimestampReferences
Returns a list ofTimestampedReference
s created from signing certificates of the signature- Returns:
- list of
TimestampedReference
s
-
getKeyInfoReferences
Returns references from the KeyInfo (for XAdES) encapsulated elements- Returns:
- list of
TimestampedReference
s
-
getTimestampedCertificateRefs
Returns a list ofTimestampedReference
certificate refs found in the givenunsignedAttribute
- Parameters:
unsignedAttribute
-SignatureTimestampSource
to find references from- Returns:
- list of
TimestampedReference
s
-
getCertificateRefs
Returns a list ofCertificateRef
s from the givenunsignedAttribute
- Parameters:
unsignedAttribute
-SignatureTimestampSource
to get certRefs from- Returns:
- list of
CertificateRef
s
-
getTimestampedRevocationRefs
Returns a list ofTimestampedReference
revocation refs found in the givenunsignedAttribute
- Parameters:
unsignedAttribute
-SignatureTimestampSource
to find references from- Returns:
- list of
TimestampedReference
s
-
getCRLRefs
Returns a list of CRL revocation refs from the givenunsignedAttribute
- Parameters:
unsignedAttribute
-SignatureTimestampSource
to get CRLRef- Returns:
- list of
CRLRef
s
-
getOCSPRefs
Returns a list of OCSP revocation refs from the givenunsignedAttribute
- Parameters:
unsignedAttribute
-SignatureTimestampSource
to get OCSPRefs from- Returns:
- list of
OCSPRef
s
-
getTimestampedCertificateValues
Returns a list ofTimestampedReference
s from theunsignedAttribute
containing certificate values- Parameters:
unsignedAttribute
-SignatureTimestampSource
to extract certificate values from- Returns:
- a list of
TimestampedReference
s
-
getEncapsulatedCertificateIdentifiers
Returns a list ofIdentifier
s obtained from the givenunsignedAttribute
- Parameters:
unsignedAttribute
-SignatureTimestampSource
to get certificate identifiers from- Returns:
- list of
Identifier
s
-
getTimestampedRevocationValues
Returns a list of timestamped revocation references extracted from the given unsigned attribute- Parameters:
unsignedAttribute
-SignatureTimestampSource
containing revocation data- Returns:
- a list of
TimestampedReference
s
-
getEncapsulatedCRLIdentifiers
Returns a list ofCRLBinary
s obtained from the givenunsignedAttribute
- Parameters:
unsignedAttribute
-SignatureTimestampSource
to get CRL identifiers from- Returns:
- list of
CRLBinary
s
-
getEncapsulatedOCSPIdentifiers
Returns a list ofOCSPResponseBinary
s obtained from the givenunsignedAttribute
- Parameters:
unsignedAttribute
-SignatureTimestampSource
to get OCSP identifiers from- Returns:
- list of
OCSPResponseBinary
s
-
incorporateArchiveTimestampReferences
protected void incorporateArchiveTimestampReferences(TimestampToken timestampToken, List<TimestampToken> previousTimestamps) The method incorporates all the timestamped references for the given archivetimestampToken
- Parameters:
timestampToken
-TimestampToken
representing an Archive TST to add references intopreviousTimestamps
- a list of previously createdTimestampToken
s
-
getArchiveTimestampOtherReferences
protected abstract List<TimestampedReference> getArchiveTimestampOtherReferences(TimestampToken timestampToken) Returns a list ofTimestampedReference
s for the given archivetimestampToken
that cannot be extracted from signature attributes (signed or unsigned), depending on its format (signedData for CAdES or, keyInfo for XAdES)- Parameters:
timestampToken
-TimestampToken
to get archive timestamp references for- Returns:
- list of
TimestampedReference
s
-
getSignatureSignedDataReferences
Returns a list of allTimestampedReference
s found into CMS SignedData of the signature NOTE: used only in ASiC-E CAdES- Returns:
- list of
TimestampedReference
s
-
getTimestampValidationData
Returns a list ofTimestampedReference
s encapsulated to the "timestamp-validation-data"unsignedAttribute
- Parameters:
unsignedAttribute
-SignatureTimestampSource
to get timestamped references from- Returns:
- list of
TimestampedReference
s
-
getCounterSignaturesReferences
protected List<TimestampedReference> getCounterSignaturesReferences(List<AdvancedSignature> counterSignatures) Returns a list ofTimestampedReference
s encapsulated from the list of counter signatures- Parameters:
counterSignatures
- a list ofAdvancedSignature
to get timestamped references from- Returns:
- list of
TimestampedReference
s
-
getCounterSignatureReferences
protected List<TimestampedReference> getCounterSignatureReferences(AdvancedSignature counterSignature) Returns a list of references extracted from a counter signature- Parameters:
counterSignature
-AdvancedSignature
representing a counter signature- Returns:
- a list of
TimestampedReference
s
-
getCounterSignatures
Extracts Counter Signatures from the givenunsignedAttribute
- Parameters:
unsignedAttribute
-SignatureTimestampSource
containing counter signatures- Returns:
- a list of
AdvancedSignature
containing counter signatures
-
getArchiveTimestampType
ReturnsArchiveTimestampType
for the givenunsignedAttribute
- Parameters:
unsignedAttribute
-SignatureTimestampSource
to 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(DigestAlgorithm digestAlgorithm) Returns aTimestampMessageDigestBuilder
to compute message digest with the providedDigestAlgorithm
- Parameters:
digestAlgorithm
-DigestAlgorithm
to use for message-digest computation- Returns:
TimestampMessageDigestBuilder
-
getTimestampMessageImprintDigestBuilder
protected abstract TimestampMessageDigestBuilder getTimestampMessageImprintDigestBuilder(TimestampToken timestampToken) Returns a relatedTimestampMessageDigestBuilder
- Parameters:
timestampToken
-TimestampToken
to get message-imprint digest builder for- Returns:
TimestampMessageDigestBuilder
-
populateSources
Allows to populate all merged sources with extracted from a timestamp data- Parameters:
timestampTokens
- a list ofTimestampToken
s to populate data from
-
populateSources
Allows to populate all merged sources with extracted from a timestamp data- Parameters:
timestampToken
-TimestampToken
to populate data from
-
isTimestamped
Description copied from interface:TimestampSource
Checks if a tokenId with the given Id is covered by the timestamp source- Specified by:
isTimestamped
in interfaceTimestampSource
- Parameters:
tokenId
-String
Id of the token to checkobjectType
-TimestampedObjectType
defining the type of the token- Returns:
- TRUE if the token if covered by the timestamp source, FALSE otherwise
-