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
- 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>archiveTimestampsThis variable contains the list of enclosed archive signature timestamps.protected ListCertificateSourcecertificateSourceCertificateSource containing merged data from signature and timestampsprotected List<TimestampToken>contentTimestampsEnclosed content timestamps.protected ListRevocationSource<CRL>crlSourceCRL revocation source containing merged data from signature and timestampsprotected ListRevocationSource<OCSP>ocspSourceOCSP revocation source containing merged data from signature and timestampsprotected List<TimestampToken>refsOnlyTimestampsEnclosed RefsOnly timestamps.protected List<TimestampToken>sigAndRefsTimestampsEnclosed SignAndRefs timestamps.protected ASsignatureThe signature is being validatedprotected List<TimestampToken>signatureTimestampsEnclosed signature timestamps.protected List<TimestampedReference>unsignedPropertiesReferencesA list of all TimestampedReferences extracted from a signature -
Constructor Summary
Constructors Modifier Constructor Description protectedSignatureTimestampSource(AS signature)Default constructor -
Method Summary
Modifier and Type Method Description voidaddExternalTimestamp(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 voidcreateAndValidate()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 ofTimestampedReferences that has been extracted from previously incorporated signed and unsigned elementsprotected abstract List<TimestampedReference>getArchiveTimestampOtherReferences(TimestampToken timestampToken)Returns a list ofTimestampedReferences for the given archivetimestampTokenthat 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 ArchiveTimestampTypegetArchiveTimestampType(SA unsignedAttribute)ReturnsArchiveTimestampTypefor the givenunsignedAttributeprotected abstract List<CertificateRef>getCertificateRefs(SA unsignedAttribute)Returns a list ofCertificateRefs from the givenunsignedAttributeList<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 givenunsignedAttributeprotected List<TimestampedReference>getCounterSignaturesReferences(List<AdvancedSignature> counterSignatures)Returns a list ofTimestampedReferences encapsulated from the list of counter signaturesprotected abstract List<CRLRef>getCRLRefs(SA unsignedAttribute)Returns a list of CRL revocation refs from the givenunsignedAttributeList<TimestampToken>getDocumentTimestamps()Returns a list of incorporated document timestamps (PAdES only)protected abstract List<Identifier>getEncapsulatedCertificateIdentifiers(SA unsignedAttribute)Returns a list ofIdentifiers obtained from the givenunsignedAttributeprotected abstract List<Identifier>getEncapsulatedCRLIdentifiers(SA unsignedAttribute)Returns a list ofIdentifiers obtained from the givenunsignedAttributeprotected abstract List<Identifier>getEncapsulatedOCSPIdentifiers(SA unsignedAttribute)Returns a list ofIdentifiers obtained from the givenunsignedAttributeprotected abstract List<TimestampedReference>getIndividualContentTimestampedReferences(SA signedAttribute)Returns a list ofTimestampedReferences 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 givenunsignedAttributeprotected List<TimestampedReference>getSignatureSignedDataReferences()Returns a list of allTimestampedReferences found into CMS SignedData of the signature NOTE: used only in ASiC-E CAdESList<TimestampedReference>getSignatureTimestampReferences()Returns a list ofTimestampedReferencefor 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 ofTimestampedReferences obtained from thesignatureScopesprotected List<TimestampedReference>getSigningCertificateTimestampReferences()Returns a list ofTimestampedReferences created from signing certificates of the signatureListCertificateSourcegetTimestampCertificateSources()Returns a mergedListCertificateSourceof all embedded timestamp certificate sourcesListCertificateSourcegetTimestampCertificateSourcesExceptLastArchiveTimestamp()Returns a mergedListCertificateSourceof all embedded timestamp certificate sources except the latest Archive TimestampListRevocationSource<CRL>getTimestampCRLSources()Returns a mergedListRevocationSourceof all embedded timestamp CRL sourcesprotected abstract TimestampDataBuildergetTimestampDataBuilder()Returns a relatedTimestampDataBuilderprotected List<TimestampedReference>getTimestampedCertificateRefs(Collection<CertificateRef> certificateRefs, ListCertificateSource listCertificateSource)Returns a list of timestamped references from the given collection ofcertificateRefsprotected List<TimestampedReference>getTimestampedCertificateRefs(SA unsignedAttribute)Returns a list ofTimestampedReferencecertificate refs found in the givenunsignedAttributeprotected List<TimestampedReference>getTimestampedCertificateValues(SA unsignedAttribute)Returns a list ofTimestampedReferences from theunsignedAttributecontaining certificate valuesprotected List<TimestampedReference>getTimestampedCRLRefs(Collection<? extends RevocationRef<CRL>> crlRefs, ListRevocationSource<CRL> crlRevocationSource)Returns a list of timestamped references from the given collection ofcrlRefsprotected List<TimestampedReference>getTimestampedOCSPRefs(Collection<? extends RevocationRef<OCSP>> ocspRefs, ListRevocationSource<OCSP> ocspRevocationSource)Returns a list of timestamped references from the given collection ofocspRefsprotected List<TimestampedReference>getTimestampedRevocationRefs(SA unsignedAttribute)Returns a list ofTimestampedReferencerevocation refs found in the givenunsignedAttributeprotected List<TimestampedReference>getTimestampedRevocationValues(SA unsignedAttribute)Returns a list of timestamped revocation references extracted from the given unsigned attributeListRevocationSource<OCSP>getTimestampOCSPSources()Returns a mergedListRevocationSourceof 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 ofTimestampedReferences encapsulated to the "timestamp-validation-data"unsignedAttributeList<TimestampedReference>getUnsignedPropertiesReferences()Returns a list ofTimestampedReferences for all tokens embedded into unsigned properties of the signatureprotected SignatureProperties<SA>getUnsignedSignatureProperties()Returns the 'unsigned-signature-properties' element of the signatureprotected voidincorporateArchiveTimestampReferences(TimestampToken timestampToken, List<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 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, 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 TimestampTokenmakeTimestampToken(SA signatureAttribute, TimestampType timestampType, List<TimestampedReference> references)Creates a timestamp token from the providedsignatureAttributeprotected voidmakeTimestampTokens()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 providedsignatureAttributeprotected voidmakeTimestampTokensFromSignedAttributes()Creates TimestampTokens from all instances extracted from signed attributes (content TSTs)protected voidmakeTimestampTokensFromUnsignedAttributes()Creates TimestampTokens from found instances in unsigned propertiesprotected voidpopulateSources(TimestampToken timestampToken)Allows to populate all merged sources with extracted from a timestamp dataprotected voidpopulateSources(List<TimestampToken> timestampTokens)Allows to populate all merged sources with extracted from a timestamp dataprotected voidvalidateTimestamps()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-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
-
getAllTimestamps
Description copied from interface:TimestampSourceReturns a list of all incorporated timestamps- Specified by:
getAllTimestampsin interfaceTimestampSource- Returns:
- a list of
TimestampTokens
-
getTimestampCertificateSources
Description copied from interface:TimestampSourceReturns a mergedListCertificateSourceof all embedded timestamp certificate sources- Specified by:
getTimestampCertificateSourcesin interfaceTimestampSource- Returns:
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
-
getTimestampCRLSources
Description copied from interface:TimestampSourceReturns a mergedListRevocationSourceof all embedded timestamp CRL sources- Specified by:
getTimestampCRLSourcesin interfaceTimestampSource- Returns:
ListRevocationSource
-
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
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
-
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
-
makeTimestampToken
protected abstract TimestampToken makeTimestampToken(SA signatureAttribute, TimestampType timestampType, List<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<TimestampToken> makeTimestampTokens(SA signatureAttribute, TimestampType timestampType, List<TimestampedReference> references)Creates timestamp tokens from the providedsignatureAttribute- Parameters:
signatureAttribute-SignatureAttributeto create timestamp fromtimestampType- a targetTimestampTypereferences- list ofTimestampedReferences covered by the current timestamp- Returns:
- a list of
TimestampTokens
-
getSignerDataReferences
Description copied from interface:TimestampSourceReturns a list ofTimestampedReferences obtained from thesignatureScopes- Specified by:
getSignerDataReferencesin interfaceTimestampSource- Returns:
- list of
TimestampedReferences
-
getIndividualContentTimestampedReferences
protected abstract List<TimestampedReference> getIndividualContentTimestampedReferences(SA signedAttribute)Returns a list ofTimestampedReferences for an "individual-data-objects-timestamp" NOTE: Used only in XAdES- Parameters:
signedAttribute-SignatureTimestampSource- Returns:
- a list of
TimestampedReferences
-
getSignatureTimestampReferences
Returns a list ofTimestampedReferencefor a "signature-timestamp" element- Returns:
- list of
TimestampedReferences
-
getSigningCertificateTimestampReferences
Returns a list ofTimestampedReferences created from signing certificates of the signature- Returns:
- list of
TimestampedReferences
-
getTimestampedCertificateRefs
Returns a list ofTimestampedReferencecertificate refs found in the givenunsignedAttribute- Parameters:
unsignedAttribute-SignatureTimestampSourceto find references from- Returns:
- list of
TimestampedReferences
-
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 ofCertificateRefs to get timestamped references fromlistCertificateSource-ListCertificateSourceto find certificate binaries from if present- Returns:
- a list of
TimestampedReferences
-
getCertificateRefs
Returns a list ofCertificateRefs from the givenunsignedAttribute- Parameters:
unsignedAttribute-SignatureTimestampSourceto get certRefs from- Returns:
- list of
CertificateRefs
-
getTimestampedRevocationRefs
Returns a list ofTimestampedReferencerevocation refs found in the givenunsignedAttribute- Parameters:
unsignedAttribute-SignatureTimestampSourceto find references from- Returns:
- list of
TimestampedReferences
-
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 ofCRLRefs to get timestamped references fromcrlRevocationSource-ListRevocationSourceto find CRL binaries from if present- Returns:
- a list of
TimestampedReferences
-
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 ofOCSPRefs to get timestamped references fromocspRevocationSource-ListRevocationSourceto find OCSP binaries from if present- Returns:
- a list of
TimestampedReferences
-
getCRLRefs
Returns a list of CRL revocation refs from the givenunsignedAttribute- Parameters:
unsignedAttribute-SignatureTimestampSourceto get CRLRef- Returns:
- list of
CRLRefs
-
getOCSPRefs
Returns a list of OCSP revocation refs from the givenunsignedAttribute- Parameters:
unsignedAttribute-SignatureTimestampSourceto get OCSPRefs from- Returns:
- list of
OCSPRefs
-
getTimestampedCertificateValues
Returns a list ofTimestampedReferences from theunsignedAttributecontaining certificate values- Parameters:
unsignedAttribute-SignatureTimestampSourceto extract certificate values from- Returns:
- a list of
TimestampedReferences
-
getEncapsulatedCertificateIdentifiers
Returns a list ofIdentifiers obtained from the givenunsignedAttribute- Parameters:
unsignedAttribute-SignatureTimestampSourceto get certificate identifiers from- Returns:
- list of
Identifiers
-
getTimestampedRevocationValues
Returns a list of timestamped revocation references extracted from the given unsigned attribute- Parameters:
unsignedAttribute-SignatureTimestampSourcecontaining revocation data- Returns:
- a list of
TimestampedReferences
-
getEncapsulatedCRLIdentifiers
Returns a list ofIdentifiers obtained from the givenunsignedAttribute- Parameters:
unsignedAttribute-SignatureTimestampSourceto get CRL identifiers from- Returns:
- list of
Identifiers
-
getEncapsulatedOCSPIdentifiers
Returns a list ofIdentifiers obtained from the givenunsignedAttribute- Parameters:
unsignedAttribute-SignatureTimestampSourceto get OCSP identifiers from- Returns:
- list of
Identifiers
-
getArchiveTimestampInitialReferences
protected List<TimestampedReference> getArchiveTimestampInitialReferences(SA unsignedAttribute, List<TimestampToken> previousTimestamps)Returns a list ofTimestampedReferences that has been extracted from previously incorporated signed and unsigned elements- Parameters:
unsignedAttribute-SignatureTimestampSourcerepresenting a timestamppreviousTimestamps- a list of previously createdTimestampToken- Returns:
- a list of
TimestampedReferences
-
incorporateArchiveTimestampReferences
protected void incorporateArchiveTimestampReferences(TimestampToken timestampToken, List<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
-
getArchiveTimestampOtherReferences
protected abstract List<TimestampedReference> getArchiveTimestampOtherReferences(TimestampToken timestampToken)Returns a list ofTimestampedReferences for the given archivetimestampTokenthat cannot be extracted from signature attributes (signed or unsigned), depending on its format (signedData for CAdES or, keyInfo for XAdES)- Parameters:
timestampToken-TimestampTokento get archive timestamp references for- Returns:
- list of
TimestampedReferences
-
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
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<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<TimestampedReference> getCounterSignatureReferences(AdvancedSignature counterSignature)Returns a list of references extracted from a coutner 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
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 -
getTimestampDataBuilder
Returns a relatedTimestampDataBuilder- Returns:
TimestampDataBuilder
-
populateSources
Allows to populate all merged sources with extracted from a timestamp data- Parameters:
timestampTokens- a list ofTimestampTokens to populate data from
-
populateSources
Allows to populate all merged sources with extracted from a timestamp data- Parameters:
timestampToken-TimestampTokento populate data from
-
isTimestamped
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
-