Class XAdESTimestampDataBuilder
java.lang.Object
eu.europa.esig.dss.xades.validation.XAdESTimestampDataBuilder
- All Implemented Interfaces:
TimestampDataBuilder
public class XAdESTimestampDataBuilder extends Object implements TimestampDataBuilder
-
Constructor Summary
Constructors Constructor Description XAdESTimestampDataBuilder(Element signature, List<org.apache.xml.security.signature.Reference> references, XAdESPaths xadesPaths)
-
Method Summary
Modifier and Type Method Description DSSDocument
getArchiveTimestampData(TimestampToken timestampToken)
Archive timestamp seals the data of the signature in a specific order.protected byte[]
getArchiveTimestampData(TimestampToken timestampToken, String canonicalizationMethod)
Gathers the data to be used to calculate the hash value sent to the TSA (messageImprint).byte[]
getArchiveTimestampData(String canonicalizationMethod)
Returns ArchiveTimestamp Data for a new TimestampDSSDocument
getContentTimestampData(TimestampToken timestampToken)
Returns the content timestamp data (timestamped or to be).DSSDocument
getSignatureTimestampData(TimestampToken timestampToken)
Returns the data (signature value) that was timestamped by the SignatureTimeStamp for the given timestamp.protected byte[]
getSignatureTimestampData(TimestampToken timestampToken, String canonicalizationMethod)
byte[]
getSignatureTimestampData(String canonicalizationMethod)
Returns SignatureTimestamp Data for a new TimestampDSSDocument
getTimestampX1Data(TimestampToken timestampToken)
Returns the data to be time-stamped.protected byte[]
getTimestampX1Data(TimestampToken timestampToken, String canonicalizationMethod)
byte[]
getTimestampX1Data(String canonicalizationMethod)
Returns SigAndRefsTimestamp Data for a new TimestampDSSDocument
getTimestampX2Data(TimestampToken timestampToken)
Returns the data to be time-stamped which contains the concatenation of CompleteCertificateRefs and CompleteRevocationRefs elements (XAdES example).protected byte[]
getTimestampX2Data(TimestampToken timestampToken, String canonicalizationMethod)
byte[]
getTimestampX2Data(String canonicalizationMethod)
Returns RefsOnlyTimestamp Data for a new Timestamp
-
Constructor Details
-
XAdESTimestampDataBuilder
public XAdESTimestampDataBuilder(Element signature, List<org.apache.xml.security.signature.Reference> references, XAdESPaths xadesPaths)
-
-
Method Details
-
getContentTimestampData
Description copied from interface:TimestampDataBuilder
Returns the content timestamp data (timestamped or to be).- Specified by:
getContentTimestampData
in interfaceTimestampDataBuilder
- Returns:
DSSDocument
representing the canonicalized data to be timestamped
-
getSignatureTimestampData
Description copied from interface:TimestampDataBuilder
Returns the data (signature value) that was timestamped by the SignatureTimeStamp for the given timestamp.- Specified by:
getSignatureTimestampData
in interfaceTimestampDataBuilder
- Returns:
DSSDocument
representing the canonicalized data to be timestamped
-
getSignatureTimestampData
Returns SignatureTimestamp Data for a new Timestamp- Parameters:
canonicalizationMethod
-String
canonicalization method to use- Returns:
- timestamp data
-
getSignatureTimestampData
protected byte[] getSignatureTimestampData(TimestampToken timestampToken, String canonicalizationMethod) -
getTimestampX1Data
Description copied from interface:TimestampDataBuilder
Returns the data to be time-stamped. The data contains the digital signature (XAdES example: ds:SignatureValue element), the signature time-stamp(s) present in the AdES-T form, the certification path references and the revocation status references.- Specified by:
getTimestampX1Data
in interfaceTimestampDataBuilder
- Parameters:
timestampToken
-TimestampToken
or null during the creation process- Returns:
DSSDocument
representing the canonicalized data to be timestamped
-
getTimestampX1Data
Returns SigAndRefsTimestamp Data for a new Timestamp- Parameters:
canonicalizationMethod
-String
canonicalization method to use- Returns:
- timestamp data
-
getTimestampX1Data
-
getTimestampX2Data
Description copied from interface:TimestampDataBuilder
Returns the data to be time-stamped which contains the concatenation of CompleteCertificateRefs and CompleteRevocationRefs elements (XAdES example).- Specified by:
getTimestampX2Data
in interfaceTimestampDataBuilder
- Returns:
DSSDocument
representing the canonicalized data to be timestamped
-
getTimestampX2Data
Returns RefsOnlyTimestamp Data for a new Timestamp- Parameters:
canonicalizationMethod
-String
canonicalization method to use- Returns:
- timestamp data
-
getTimestampX2Data
-
getArchiveTimestampData
Description copied from interface:TimestampDataBuilder
Archive timestamp seals the data of the signature in a specific order. We need to retrieve the data for each timestamp.- Specified by:
getArchiveTimestampData
in interfaceTimestampDataBuilder
- Parameters:
timestampToken
- null when adding a new archive timestamp- Returns:
DSSDocument
representing the canonicalized data to be timestamped
-
getArchiveTimestampData
Returns ArchiveTimestamp Data for a new Timestamp- Parameters:
canonicalizationMethod
-String
canonicalization method to use- Returns:
- timestamp data
-
getArchiveTimestampData
protected byte[] getArchiveTimestampData(TimestampToken timestampToken, String canonicalizationMethod)Gathers the data to be used to calculate the hash value sent to the TSA (messageImprint).- Parameters:
timestampToken
-TimestampToken
to validate, ornull
when adding a new archive timestampcanonicalizationMethod
-- Returns:
byte
array containing the canonicalized and concatenated timestamped data
-