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:
- Serialized Form
-
Field Summary
Fields Modifier and Type Field Description protected List<TimestampToken>
archiveTimestamps
This variable contains the list of enclosed archive signature timestamps.protected ListCertificateSource
certificateSource
CertificateSource containing merged data from signature and timestampsprotected List<TimestampToken>
contentTimestamps
Enclosed content timestamps.protected ListRevocationSource<CRL>
crlSource
CRL revocation source containing merged data from signature and timestampsprotected ListRevocationSource<OCSP>
ocspSource
OCSP revocation source containing merged data from signature and timestampsprotected List<TimestampToken>
refsOnlyTimestamps
Enclosed RefsOnly timestamps.protected List<TimestampToken>
sigAndRefsTimestamps
Enclosed SignAndRefs timestamps.protected AS
signature
The signature is being validatedprotected List<TimestampToken>
signatureTimestamps
Enclosed signature timestamps.protected List<TimestampedReference>
unsignedPropertiesReferences
A list of all TimestampedReferences extracted from a signature -
Constructor Summary
Constructors Modifier Constructor Description protected
SignatureTimestampSource(AS signature)
Default constructor -
Method Summary
Modifier and Type Method Description void
addExternalTimestamp(TimestampToken timestamp)
This method allows to add an external timestamp.protected abstract SignatureProperties<SA>
buildSignedSignatureProperties()
Creates the 'signed-signature-properties' element of the signatureprotected abstract SignatureProperties<SA>
buildUnsignedSignatureProperties()
Creates the 'unsigned-signature-properties' element of the signatureprotected void
createAndValidate()
Creates and validates all timestamps Must be called only onceList<TimestampToken>
getAllTimestamps()
Returns a list of all incorporated timestampsprotected List<TimestampedReference>
getArchiveTimestampInitialReferences(SA unsignedAttribute, List<TimestampToken> previousTimestamps)
Returns a list ofTimestampedReference
s that has been extracted from previously incorporated signed and unsigned elementsprotected 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)List<TimestampToken>
getArchiveTimestamps()
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
List<TimestampToken>
getContentTimestamps()
Returns a list of incorporated content timestampsprotected List<TimestampedReference>
getCounterSignatureReferences(AdvancedSignature counterSignature)
Returns a list of references extracted from a coutner 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 signaturesprotected abstract List<CRLRef>
getCRLRefs(SA unsignedAttribute)
Returns a list of CRL revocation refs from the givenunsignedAttribute
List<TimestampToken>
getDocumentTimestamps()
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
protected abstract List<Identifier>
getEncapsulatedCRLIdentifiers(SA unsignedAttribute)
Returns a list ofIdentifier
s obtained from the givenunsignedAttribute
protected abstract List<Identifier>
getEncapsulatedOCSPIdentifiers(SA unsignedAttribute)
Returns a list ofIdentifier
s obtained from the givenunsignedAttribute
protected abstract List<TimestampedReference>
getIndividualContentTimestampedReferences(SA signedAttribute)
Returns a list ofTimestampedReference
s for an "individual-data-objects-timestamp" NOTE: Used only in XAdESprotected abstract List<OCSPRef>
getOCSPRefs(SA unsignedAttribute)
Returns a list of OCSP revocation refs from the givenunsignedAttribute
protected List<TimestampedReference>
getSignatureSignedDataReferences()
Returns a list of allTimestampedReference
s found into CMS SignedData of the signature NOTE: used only in ASiC-E CAdESList<TimestampedReference>
getSignatureTimestampReferences()
Returns a list ofTimestampedReference
for a "signature-timestamp" elementList<TimestampToken>
getSignatureTimestamps()
Returns a list of incorporated signature timestampsprotected SignatureProperties<SA>
getSignedSignatureProperties()
Returns the 'signed-signature-properties' element of the signatureList<TimestampedReference>
getSignerDataReferences()
Returns a list ofTimestampedReference
s obtained from thesignatureScopes
protected List<TimestampedReference>
getSigningCertificateTimestampReferences()
Returns a list ofTimestampedReference
s created from signing certificates of the signatureListCertificateSource
getTimestampCertificateSources()
Returns a mergedListCertificateSource
of all embedded timestamp certificate sourcesListCertificateSource
getTimestampCertificateSourcesExceptLastArchiveTimestamp()
Returns a mergedListCertificateSource
of all embedded timestamp certificate sources except the latest Archive TimestampListRevocationSource<CRL>
getTimestampCRLSources()
Returns a mergedListRevocationSource
of all embedded timestamp CRL sourcesprotected abstract TimestampDataBuilder
getTimestampDataBuilder()
Returns a relatedTimestampDataBuilder
protected List<TimestampedReference>
getTimestampedCertificateRefs(Collection<CertificateRef> certificateRefs, ListCertificateSource listCertificateSource)
Returns a list of timestamped references from the given collection ofcertificateRefs
protected 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>
getTimestampedCRLRefs(Collection<? extends RevocationRef<CRL>> crlRefs, ListRevocationSource<CRL> crlRevocationSource)
Returns a list of timestamped references from the given collection ofcrlRefs
protected List<TimestampedReference>
getTimestampedOCSPRefs(Collection<? extends RevocationRef<OCSP>> ocspRefs, ListRevocationSource<OCSP> ocspRevocationSource)
Returns a list of timestamped references from the given collection ofocspRefs
protected 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 attributeListRevocationSource<OCSP>
getTimestampOCSPSources()
Returns a mergedListRevocationSource
of all embedded timestamp OCSP sourcesList<TimestampToken>
getTimestampsX1()
Returns a list of incorporated SigAndRefs timestampsList<TimestampToken>
getTimestampsX2()
Returns a list of incorporated RefsOnly timestampsprotected List<TimestampedReference>
getTimestampValidationData(SA unsignedAttribute)
Returns a list ofTimestampedReference
s encapsulated to the "timestamp-validation-data"unsignedAttribute
List<TimestampedReference>
getUnsignedPropertiesReferences()
Returns a list ofTimestampedReference
s for all tokens embedded into unsigned properties of the signatureprotected SignatureProperties<SA>
getUnsignedSignatureProperties()
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
makeTimestampTokens()
Populates all the lists by data found into the signatureprotected List<TimestampToken>
makeTimestampTokens(SA signatureAttribute, TimestampType timestampType, List<TimestampedReference> references)
Creates timestamp tokens from the providedsignatureAttribute
protected void
makeTimestampTokensFromSignedAttributes()
Creates TimestampTokens from all instances extracted from signed attributes (content TSTs)protected void
makeTimestampTokensFromUnsignedAttributes()
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
validateTimestamps()
Validates list of all timestamps present in the sourceMethods inherited from class eu.europa.esig.dss.validation.timestamp.AbstractTimestampSource
addReference, addReference, addReferences, createReferencesForCertificates, createReferencesForIdentifiers, getEncapsulatedReferencesFromTimestamps, 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. -
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
-
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
-
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, List<TimestampedReference> references)Creates timestamp tokens from the providedsignatureAttribute
- 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
-
getIndividualContentTimestampedReferences
protected abstract List<TimestampedReference> getIndividualContentTimestampedReferences(SA signedAttribute)Returns a list ofTimestampedReference
s for an "individual-data-objects-timestamp" NOTE: Used only in XAdES- Parameters:
signedAttribute
-SignatureTimestampSource
- Returns:
- a list of
TimestampedReference
s
-
getSignatureTimestampReferences
Returns a list ofTimestampedReference
for a "signature-timestamp" element- Returns:
- list of
TimestampedReference
s
-
getSigningCertificateTimestampReferences
Returns a list ofTimestampedReference
s created from signing certificates of the signature- 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
-
getTimestampedCertificateRefs
protected List<TimestampedReference> getTimestampedCertificateRefs(Collection<CertificateRef> certificateRefs, ListCertificateSource listCertificateSource)Returns a list of timestamped references from the given collection ofcertificateRefs
- Parameters:
certificateRefs
- a collection ofCertificateRef
s to get timestamped references fromlistCertificateSource
-ListCertificateSource
to find certificate binaries from if present- Returns:
- a 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
-
getTimestampedCRLRefs
protected List<TimestampedReference> getTimestampedCRLRefs(Collection<? extends RevocationRef<CRL>> crlRefs, ListRevocationSource<CRL> crlRevocationSource)Returns a list of timestamped references from the given collection ofcrlRefs
- Parameters:
crlRefs
- a collection ofCRLRef
s to get timestamped references fromcrlRevocationSource
-ListRevocationSource
to find CRL binaries from if present- Returns:
- a list of
TimestampedReference
s
-
getTimestampedOCSPRefs
protected List<TimestampedReference> getTimestampedOCSPRefs(Collection<? extends RevocationRef<OCSP>> ocspRefs, ListRevocationSource<OCSP> ocspRevocationSource)Returns a list of timestamped references from the given collection ofocspRefs
- Parameters:
ocspRefs
- a collection ofOCSPRef
s to get timestamped references fromocspRevocationSource
-ListRevocationSource
to find OCSP binaries from if present- Returns:
- a 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 ofIdentifier
s obtained from the givenunsignedAttribute
- Parameters:
unsignedAttribute
-SignatureTimestampSource
to get CRL identifiers from- Returns:
- list of
Identifier
s
-
getEncapsulatedOCSPIdentifiers
Returns a list ofIdentifier
s obtained from the givenunsignedAttribute
- Parameters:
unsignedAttribute
-SignatureTimestampSource
to get OCSP identifiers from- Returns:
- list of
Identifier
s
-
getArchiveTimestampInitialReferences
protected List<TimestampedReference> getArchiveTimestampInitialReferences(SA unsignedAttribute, List<TimestampToken> previousTimestamps)Returns a list ofTimestampedReference
s that has been extracted from previously incorporated signed and unsigned elements- Parameters:
unsignedAttribute
-SignatureTimestampSource
representing a timestamppreviousTimestamps
- a list of previously createdTimestampToken
- Returns:
- a list of
TimestampedReference
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 coutner 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 -
getTimestampDataBuilder
Returns a relatedTimestampDataBuilder
- Returns:
TimestampDataBuilder
-
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
-