Class XAdESTimestampSource
java.lang.Object
eu.europa.esig.dss.validation.timestamp.AbstractTimestampSource<XAdESAttribute>
eu.europa.esig.dss.xades.validation.XAdESTimestampSource
- All Implemented Interfaces:
SignatureTimestampSource
,Serializable
public class XAdESTimestampSource extends AbstractTimestampSource<XAdESAttribute>
- See Also:
- Serialized Form
-
Field Summary
Fields inherited from class eu.europa.esig.dss.validation.timestamp.AbstractTimestampSource
certificatePool, crlSource, ocspSource, signatureCertificateSource, signatureCRLSource, signatureId, signatureOCSPSource, signatureScopes, timestampCertificateSource
-
Constructor Summary
Constructors Constructor Description XAdESTimestampSource(XAdESSignature signature, Element signatureElement, XAdESPaths xadesPaths, CertificatePool certificatePool)
-
Method Summary
Modifier and Type Method Description byte[]
getArchiveTimestampData(String canonicalizationMethod)
Returns concatenated data for an ArchiveTimestampprotected ArchiveTimestampType
getArchiveTimestampType(XAdESAttribute unsignedAttribute)
ReturnsArchiveTimestampType
for the givenunsignedAttribute
protected List<Digest>
getCertificateRefDigests(XAdESAttribute unsignedAttribute)
Returns a list ofDigest
s from the givenunsignedAttribute
protected List<EncapsulatedCertificateTokenIdentifier>
getEncapsulatedCertificateIdentifiers(XAdESAttribute unsignedAttribute)
Returns a list ofEncapsulatedCertificateTokenIdentifier
s obtained from the givenunsignedAttribute
protected List<CRLBinary>
getEncapsulatedCRLIdentifiers(XAdESAttribute unsignedAttribute)
Returns a list ofCRLBinary
s obtained from the givenunsignedAttribute
protected List<OCSPResponseBinary>
getEncapsulatedOCSPIdentifiers(XAdESAttribute unsignedAttribute)
Returns a list ofOCSPResponseBinary
s obtained from the givenunsignedAttribute
protected List<TimestampedReference>
getIndividualContentTimestampedReferences(XAdESAttribute signedAttribute)
Returns a list ofTimestampedReference
s for an "individual-data-objects-timestamp" NOTE: Used only in XAdESprotected List<Digest>
getRevocationRefCRLDigests(XAdESAttribute unsignedAttribute)
Returns a list of CRL revocation refDigest
s from the givenunsignedAttribute
protected List<Digest>
getRevocationRefOCSPDigests(XAdESAttribute unsignedAttribute)
Returns a list of OCSP revocation refDigest
s from the givenunsignedAttribute
byte[]
getSignatureTimestampData(String canonicalizationMethod)
Returns concatenated data for a SignatureTimestampprotected List<TimestampedReference>
getSignatureTimestampReferences()
Returns a list ofTimestampedReference
for a "signature-timestamp" elementprotected SignatureProperties<XAdESAttribute>
getSignedSignatureProperties()
Returns the 'signed-signature-properties' element of the signatureprotected XAdESTimestampDataBuilder
getTimestampDataBuilder()
Returns a relatedTimestampDataBuilder
byte[]
getTimestampX1Data(String canonicalizationMethod)
Returns concatenated data for a SigAndRefsTimestampbyte[]
getTimestampX2Data(String canonicalizationMethod)
Returns concatenated data for a RefsOnlyTimestampprotected SignatureProperties<XAdESAttribute>
getUnsignedSignatureProperties()
Returns the 'unsigned-signature-properties' element of the signatureprotected boolean
isAllDataObjectsTimestamp(XAdESAttribute signedAttribute)
Determines if the givensignedAttribute
is an instance of "data-objects-timestamp" element NOTE: Applicable only for XAdESprotected boolean
isArchiveTimestamp(XAdESAttribute unsignedAttribute)
Determines if the givenunsignedAttribute
is an instance of "archive-timestamp" elementprotected boolean
isAttributeCertificateRef(XAdESAttribute unsignedAttribute)
Determines if the givenunsignedAttribute
is an instance of "attribute-certificate-ref" elementprotected boolean
isAttributeRevocationRef(XAdESAttribute unsignedAttribute)
Determines if the givenunsignedAttribute
is an instance of "attribute-revocation-ref" elementprotected boolean
isCertificateValues(XAdESAttribute unsignedAttribute)
Determines if the givenunsignedAttribute
is an instance of "certificate-values" elementprotected boolean
isCompleteCertificateRef(XAdESAttribute unsignedAttribute)
Determines if the givenunsignedAttribute
is an instance of "complete-certificate-ref" elementprotected boolean
isCompleteRevocationRef(XAdESAttribute unsignedAttribute)
Determines if the givenunsignedAttribute
is an instance of "complete-revocation-ref" elementprotected boolean
isContentTimestamp(XAdESAttribute signedAttribute)
Determines if the givensignedAttribute
is an instance of "content-timestamp" element NOTE: Applicable only for CAdESprotected boolean
isIndividualDataObjectsTimestamp(XAdESAttribute signedAttribute)
Determines if the givensignedAttribute
is an instance of "individual-data-objects-timestamp" element NOTE: Applicable only for XAdESprotected boolean
isRefsOnlyTimestamp(XAdESAttribute unsignedAttribute)
Determines if the givenunsignedAttribute
is an instance of "refs-only-timestamp" elementprotected boolean
isRevocationValues(XAdESAttribute unsignedAttribute)
Determines if the givenunsignedAttribute
is an instance of "revocation-values" elementprotected boolean
isSigAndRefsTimestamp(XAdESAttribute unsignedAttribute)
Determines if the givenunsignedAttribute
is an instance of "sig-and-refs-timestamp" elementprotected boolean
isSignatureTimestamp(XAdESAttribute unsignedAttribute)
Determines if the givenunsignedAttribute
is an instance of "signature-timestamp" elementprotected boolean
isTimeStampValidationData(XAdESAttribute unsignedAttribute)
Determines if the givenunsignedAttribute
is an instance of "timestamp-validation-data" elementprotected TimestampToken
makeTimestampToken(XAdESAttribute unsignedAttribute, TimestampType timestampType, List<TimestampedReference> references)
Creates a timestamp token from the providedsignatureAttribute
Methods inherited from class eu.europa.esig.dss.validation.timestamp.AbstractTimestampSource
addEncapsulatedValuesFromTimestamp, addExternalTimestamp, addReference, addReferences, addReferencesForPreviousTimestamps, createAndValidate, createReferencesForCertificates, getAllContentTimestampReferences, getAllTimestamps, getArchiveTimestamps, getCertificateMapWithinTimestamps, getCertificates, getContentTimestamps, getDocumentTimestamps, getSignatureSignedDataReferences, getSignatureTimestamps, getSignedDataReferences, getSigningCertificateTimestampReferences, getTimestampCRLSources, getTimestampedCertificateRefs, getTimestampedCertificateValues, getTimestampedRevocationRefs, getTimestampedRevocationValues, getTimestampOCSPSources, getTimestampsX1, getTimestampsX2, getTimestampValidationData, makeTimestampTokens, populateTimestampCertificateSource, validateTimestamps
-
Constructor Details
-
XAdESTimestampSource
public XAdESTimestampSource(XAdESSignature signature, Element signatureElement, XAdESPaths xadesPaths, CertificatePool certificatePool)
-
-
Method Details
-
getSignedSignatureProperties
Description copied from class:AbstractTimestampSource
Returns the 'signed-signature-properties' element of the signature- Specified by:
getSignedSignatureProperties
in classAbstractTimestampSource<XAdESAttribute>
- Returns:
SignatureProperties
-
getUnsignedSignatureProperties
Description copied from class:AbstractTimestampSource
Returns the 'unsigned-signature-properties' element of the signature- Specified by:
getUnsignedSignatureProperties
in classAbstractTimestampSource<XAdESAttribute>
- Returns:
SignatureProperties
-
getTimestampDataBuilder
Description copied from class:AbstractTimestampSource
Returns a relatedTimestampDataBuilder
- Specified by:
getTimestampDataBuilder
in classAbstractTimestampSource<XAdESAttribute>
- Returns:
TimestampDataBuilder
-
getSignatureTimestampData
Returns concatenated data for a SignatureTimestamp- Parameters:
canonicalizationMethod
-String
canonicalization method to use- Returns:
- byte array
-
getTimestampX1Data
Returns concatenated data for a SigAndRefsTimestamp- Parameters:
canonicalizationMethod
-String
canonicalization method to use- Returns:
- byte array
-
getTimestampX2Data
Returns concatenated data for a RefsOnlyTimestamp- Parameters:
canonicalizationMethod
-String
canonicalization method to use- Returns:
- byte array
-
getArchiveTimestampData
Returns concatenated data for an ArchiveTimestamp- Parameters:
canonicalizationMethod
-String
canonicalization method to use- Returns:
- byte array
-
isContentTimestamp
Description copied from class:AbstractTimestampSource
Determines if the givensignedAttribute
is an instance of "content-timestamp" element NOTE: Applicable only for CAdES- Specified by:
isContentTimestamp
in classAbstractTimestampSource<XAdESAttribute>
- Parameters:
signedAttribute
-ISignatureAttribute
to process- Returns:
- TRUE if the
unsignedAttribute
is a Data Objects Timestamp, FALSE otherwise
-
isAllDataObjectsTimestamp
Description copied from class:AbstractTimestampSource
Determines if the givensignedAttribute
is an instance of "data-objects-timestamp" element NOTE: Applicable only for XAdES- Specified by:
isAllDataObjectsTimestamp
in classAbstractTimestampSource<XAdESAttribute>
- Parameters:
signedAttribute
-ISignatureAttribute
to process- Returns:
- TRUE if the
unsignedAttribute
is a Data Objects Timestamp, FALSE otherwise
-
isIndividualDataObjectsTimestamp
Description copied from class:AbstractTimestampSource
Determines if the givensignedAttribute
is an instance of "individual-data-objects-timestamp" element NOTE: Applicable only for XAdES- Specified by:
isIndividualDataObjectsTimestamp
in classAbstractTimestampSource<XAdESAttribute>
- Parameters:
signedAttribute
-ISignatureAttribute
to process- Returns:
- TRUE if the
unsignedAttribute
is a Data Objects Timestamp, FALSE otherwise
-
isSignatureTimestamp
Description copied from class:AbstractTimestampSource
Determines if the givenunsignedAttribute
is an instance of "signature-timestamp" element- Specified by:
isSignatureTimestamp
in classAbstractTimestampSource<XAdESAttribute>
- Parameters:
unsignedAttribute
-ISignatureAttribute
to process- Returns:
- TRUE if the
unsignedAttribute
is a Signature Timestamp, FALSE otherwise
-
isCompleteCertificateRef
Description copied from class:AbstractTimestampSource
Determines if the givenunsignedAttribute
is an instance of "complete-certificate-ref" element- Specified by:
isCompleteCertificateRef
in classAbstractTimestampSource<XAdESAttribute>
- Parameters:
unsignedAttribute
-ISignatureAttribute
to process- Returns:
- TRUE if the
unsignedAttribute
is a Complete Certificate Ref, FALSE otherwise
-
isAttributeCertificateRef
Description copied from class:AbstractTimestampSource
Determines if the givenunsignedAttribute
is an instance of "attribute-certificate-ref" element- Specified by:
isAttributeCertificateRef
in classAbstractTimestampSource<XAdESAttribute>
- Parameters:
unsignedAttribute
-ISignatureAttribute
to process- Returns:
- TRUE if the
unsignedAttribute
is an Attribute Certificate Ref, FALSE otherwise
-
isCompleteRevocationRef
Description copied from class:AbstractTimestampSource
Determines if the givenunsignedAttribute
is an instance of "complete-revocation-ref" element- Specified by:
isCompleteRevocationRef
in classAbstractTimestampSource<XAdESAttribute>
- Parameters:
unsignedAttribute
-ISignatureAttribute
to process- Returns:
- TRUE if the
unsignedAttribute
is a Complete Revocation Ref, FALSE otherwise
-
isAttributeRevocationRef
Description copied from class:AbstractTimestampSource
Determines if the givenunsignedAttribute
is an instance of "attribute-revocation-ref" element- Specified by:
isAttributeRevocationRef
in classAbstractTimestampSource<XAdESAttribute>
- Parameters:
unsignedAttribute
-ISignatureAttribute
to process- Returns:
- TRUE if the
unsignedAttribute
is an Attribute Revocation Ref, FALSE otherwise
-
isRefsOnlyTimestamp
Description copied from class:AbstractTimestampSource
Determines if the givenunsignedAttribute
is an instance of "refs-only-timestamp" element- Specified by:
isRefsOnlyTimestamp
in classAbstractTimestampSource<XAdESAttribute>
- Parameters:
unsignedAttribute
-ISignatureAttribute
to process- Returns:
- TRUE if the
unsignedAttribute
is a Refs Only TimeStamp, FALSE otherwise
-
isSigAndRefsTimestamp
Description copied from class:AbstractTimestampSource
Determines if the givenunsignedAttribute
is an instance of "sig-and-refs-timestamp" element- Specified by:
isSigAndRefsTimestamp
in classAbstractTimestampSource<XAdESAttribute>
- Parameters:
unsignedAttribute
-ISignatureAttribute
to process- Returns:
- TRUE if the
unsignedAttribute
is a Sig And Refs TimeStamp, FALSE otherwise
-
isCertificateValues
Description copied from class:AbstractTimestampSource
Determines if the givenunsignedAttribute
is an instance of "certificate-values" element- Specified by:
isCertificateValues
in classAbstractTimestampSource<XAdESAttribute>
- Parameters:
unsignedAttribute
-ISignatureAttribute
to process- Returns:
- TRUE if the
unsignedAttribute
is a Certificate Values, FALSE otherwise
-
isRevocationValues
Description copied from class:AbstractTimestampSource
Determines if the givenunsignedAttribute
is an instance of "revocation-values" element- Specified by:
isRevocationValues
in classAbstractTimestampSource<XAdESAttribute>
- Parameters:
unsignedAttribute
-ISignatureAttribute
to process- Returns:
- TRUE if the
unsignedAttribute
is a Revocation Values, FALSE otherwise
-
isArchiveTimestamp
Description copied from class:AbstractTimestampSource
Determines if the givenunsignedAttribute
is an instance of "archive-timestamp" element- Specified by:
isArchiveTimestamp
in classAbstractTimestampSource<XAdESAttribute>
- Parameters:
unsignedAttribute
-ISignatureAttribute
to process- Returns:
- TRUE if the
unsignedAttribute
is an Archive TimeStamp, FALSE otherwise
-
isTimeStampValidationData
Description copied from class:AbstractTimestampSource
Determines if the givenunsignedAttribute
is an instance of "timestamp-validation-data" element- Specified by:
isTimeStampValidationData
in classAbstractTimestampSource<XAdESAttribute>
- Parameters:
unsignedAttribute
-ISignatureAttribute
to process- Returns:
- TRUE if the
unsignedAttribute
is a TimeStamp Validation Data, FALSE otherwise
-
makeTimestampToken
protected TimestampToken makeTimestampToken(XAdESAttribute unsignedAttribute, TimestampType timestampType, List<TimestampedReference> references)Description copied from class:AbstractTimestampSource
Creates a timestamp token from the providedsignatureAttribute
- Specified by:
makeTimestampToken
in classAbstractTimestampSource<XAdESAttribute>
- Parameters:
unsignedAttribute
-ISignatureAttribute
to create timestamp fromtimestampType
- a targetTimestampType
references
- list ofTimestampedReference
s covered by the current timestamp- Returns:
TimestampToken
-
getIndividualContentTimestampedReferences
protected List<TimestampedReference> getIndividualContentTimestampedReferences(XAdESAttribute signedAttribute)Description copied from class:AbstractTimestampSource
Returns a list ofTimestampedReference
s for an "individual-data-objects-timestamp" NOTE: Used only in XAdES- Specified by:
getIndividualContentTimestampedReferences
in classAbstractTimestampSource<XAdESAttribute>
- Parameters:
signedAttribute
-AbstractTimestampSource
- Returns:
- a list of
TimestampedReference
s
-
getSignatureTimestampReferences
Description copied from class:AbstractTimestampSource
Returns a list ofTimestampedReference
for a "signature-timestamp" element- Overrides:
getSignatureTimestampReferences
in classAbstractTimestampSource<XAdESAttribute>
- Returns:
- list of
TimestampedReference
s
-
getCertificateRefDigests
Description copied from class:AbstractTimestampSource
Returns a list ofDigest
s from the givenunsignedAttribute
- Specified by:
getCertificateRefDigests
in classAbstractTimestampSource<XAdESAttribute>
- Parameters:
unsignedAttribute
-AbstractTimestampSource
to get certRef Digests from- Returns:
- list of
Digest
s
-
getRevocationRefCRLDigests
Description copied from class:AbstractTimestampSource
Returns a list of CRL revocation refDigest
s from the givenunsignedAttribute
- Specified by:
getRevocationRefCRLDigests
in classAbstractTimestampSource<XAdESAttribute>
- Parameters:
unsignedAttribute
-AbstractTimestampSource
to get CRLRef Digests from- Returns:
- list of
Digest
s
-
getRevocationRefOCSPDigests
Description copied from class:AbstractTimestampSource
Returns a list of OCSP revocation refDigest
s from the givenunsignedAttribute
- Specified by:
getRevocationRefOCSPDigests
in classAbstractTimestampSource<XAdESAttribute>
- Parameters:
unsignedAttribute
-AbstractTimestampSource
to get OCSPRef Digests from- Returns:
- list of
Digest
s
-
getEncapsulatedCertificateIdentifiers
protected List<EncapsulatedCertificateTokenIdentifier> getEncapsulatedCertificateIdentifiers(XAdESAttribute unsignedAttribute)Description copied from class:AbstractTimestampSource
Returns a list ofEncapsulatedCertificateTokenIdentifier
s obtained from the givenunsignedAttribute
- Specified by:
getEncapsulatedCertificateIdentifiers
in classAbstractTimestampSource<XAdESAttribute>
- Parameters:
unsignedAttribute
-AbstractTimestampSource
to get certificate identifiers from- Returns:
- list of
EncapsulatedCertificateTokenIdentifier
s
-
getEncapsulatedCRLIdentifiers
Description copied from class:AbstractTimestampSource
Returns a list ofCRLBinary
s obtained from the givenunsignedAttribute
- Specified by:
getEncapsulatedCRLIdentifiers
in classAbstractTimestampSource<XAdESAttribute>
- Parameters:
unsignedAttribute
-AbstractTimestampSource
to get CRL identifiers from- Returns:
- list of
CRLBinary
s
-
getEncapsulatedOCSPIdentifiers
protected List<OCSPResponseBinary> getEncapsulatedOCSPIdentifiers(XAdESAttribute unsignedAttribute)Description copied from class:AbstractTimestampSource
Returns a list ofOCSPResponseBinary
s obtained from the givenunsignedAttribute
- Specified by:
getEncapsulatedOCSPIdentifiers
in classAbstractTimestampSource<XAdESAttribute>
- Parameters:
unsignedAttribute
-AbstractTimestampSource
to get OCSP identifiers from- Returns:
- list of
OCSPResponseBinary
s
-
getArchiveTimestampType
Description copied from class:AbstractTimestampSource
ReturnsArchiveTimestampType
for the givenunsignedAttribute
- Specified by:
getArchiveTimestampType
in classAbstractTimestampSource<XAdESAttribute>
- Parameters:
unsignedAttribute
-AbstractTimestampSource
to get archive timestamp type for
-