Class XAdESLevelBaselineT
java.lang.Object
eu.europa.esig.dss.xades.signature.XAdESBuilder
eu.europa.esig.dss.xades.signature.ExtensionBuilder
eu.europa.esig.dss.xades.signature.XAdESLevelBaselineT
- All Implemented Interfaces:
SignatureExtension<XAdESSignatureParameters>
- Direct Known Subclasses:
XAdESLevelBaselineLT
,XAdESLevelC
public class XAdESLevelBaselineT
extends ExtensionBuilder
implements SignatureExtension<XAdESSignatureParameters>
-T profile of XAdES signature
-
Field Summary
Modifier and TypeFieldDescriptionprotected TSPSource
The object encapsulating the Time Stamp Protocol needed to create the level -T, of the signatureFields inherited from class eu.europa.esig.dss.xades.signature.ExtensionBuilder
currentSignatureDom, documentAnalyzer, qualifyingPropertiesDom, unsignedPropertiesDom, unsignedSignaturePropertiesDom, xadesSignature
Fields inherited from class eu.europa.esig.dss.xades.signature.XAdESBuilder
certificateVerifier, documentDom, ENCAPSULATED_TIMESTAMP_PREFIX, ID_PREFIX, params, REFERENCED_DATA, TARGET, TIMESTAMP_PREFIX, URI, xadesPath
-
Constructor Summary
ConstructorDescriptionXAdESLevelBaselineT
(CertificateVerifier certificateVerifier) The default constructor for XAdESLevelBaselineT. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Checks if the detached content represented by binary documents (used for -LTA level extension)protected void
createXAdESTimeStampType
(TimestampType timestampType, String timestampC14nMethod, DSSMessageDigest messageDigest) Creates any XAdES TimeStamp object representation.extendSignatures
(DSSDocument dssDocument, XAdESSignatureParameters params) Extends the level of the signatures contained in a document.protected void
extendSignatures
(List<AdvancedSignature> signatures) Extends signatures to a desired level.
This method is overridden by other profiles.
For -T profile adds the SignatureTimeStamp element which contains a single HashDataInfo element that refers to the ds:SignatureValue element of the [XMLDSIG] signature.protected SignatureRequirementsChecker
Instantiates aSignatureRequirementsChecker
protected void
This method incorporate timestamp type object.protected Element
incorporateCertificateValues
(Element parentDom, Collection<CertificateToken> certificatesToBeAdded) This method incorporates all certificates passed as parameter :protected void
incorporateCertificateValues
(Element parentDom, Collection<CertificateToken> certificatesToBeAdded, String indent) This method incorporates all certificates passed as parameter, as well as adds missing indents if the parameter is specifiedprotected Element
incorporateRevocationValues
(Element parentDom, Collection<CRLToken> crlsToAdd, Collection<OCSPToken> ocspsToAdd) This method incorporates revocation values.protected void
incorporateRevocationValues
(Element parentDom, Collection<CRLToken> crlsToAdd, Collection<OCSPToken> ocspsToAdd, String indent) This method incorporates revocation values, as well as adds missing indents if the parameter is specified:protected void
incorporateTimestampValidationData
(ValidationData validationDataForInclusion, String indent) This method incorporates the timestamp validation data in the signatureprotected String
This method removes the timestamp validation data of the last archive timestamp.protected String
This method removes old certificate values from the unsigned signature properties element.protected void
This method removes old revocation values from the unsigned signature properties element.void
setTspSource
(TSPSource tspSource) Sets the TSP source to be used when extending the digital signatureMethods inherited from class eu.europa.esig.dss.xades.signature.ExtensionBuilder
alignNodes, ensureSignedDataObjectProperties, ensureUnsignedProperties, ensureUnsignedSignatureProperties, getXadesNamespace, getXmldsigNamespace, indentIfPrettyPrint, initializeSignatureBuilder, removeNode, removeNodes
Methods inherited from class eu.europa.esig.dss.xades.signature.XAdESBuilder
createXmlDocument, getCurrentXAdESElements, getCurrentXAdESPath, getXades141Namespace, incorporateCert, incorporateCertDigest, incorporateDigestMethod, incorporateDigestValue, incorporateDigestValue, incorporateIssuerV1, incorporateIssuerV2, incorporateSPDocSpecification, toXmlIdentifier
-
Field Details
-
tspSource
The object encapsulating the Time Stamp Protocol needed to create the level -T, of the signature
-
-
Constructor Details
-
XAdESLevelBaselineT
The default constructor for XAdESLevelBaselineT.- Parameters:
certificateVerifier
-CertificateVerifier
-
-
Method Details
-
extendSignatures
public DSSDocument extendSignatures(DSSDocument dssDocument, XAdESSignatureParameters params) throws DSSException Description copied from interface:SignatureExtension
Extends the level of the signatures contained in a document.- Specified by:
extendSignatures
in interfaceSignatureExtension<XAdESSignatureParameters>
- Parameters:
dssDocument
- The signed document to be signedparams
- the parameters for the extension- Returns:
- the extended document
- Throws:
DSSException
-
extendSignatures
Extends signatures to a desired level.
This method is overridden by other profiles.
For -T profile adds the SignatureTimeStamp element which contains a single HashDataInfo element that refers to the ds:SignatureValue element of the [XMLDSIG] signature. The timestamp token is obtained from TSP source.
Adds<SignatureTimeStamp>
segment into<UnsignedSignatureProperties>
element.- Parameters:
signatures
- a list ofAdvancedSignature
s to extend
-
getSignatureRequirementsChecker
Instantiates aSignatureRequirementsChecker
- Returns:
SignatureRequirementsChecker
-
setTspSource
Sets the TSP source to be used when extending the digital signature- Parameters:
tspSource
- the tspSource to set
-
incorporateCertificateValues
protected Element incorporateCertificateValues(Element parentDom, Collection<CertificateToken> certificatesToBeAdded) This method incorporates all certificates passed as parameter :<xades:CertificateValues> <xades:EncapsulatedX509Certificate>MIIC9TC...</xades:EncapsulatedX509Certificate> ... </xades:CertificateValues>
- Parameters:
parentDom
- the parent elementcertificatesToBeAdded
- a collection ofCertificateToken
s to be added into the signature values element- Returns:
Element
incorporated signature values element
-
incorporateRevocationValues
protected Element incorporateRevocationValues(Element parentDom, Collection<CRLToken> crlsToAdd, Collection<OCSPToken> ocspsToAdd) This method incorporates revocation values.<xades:RevocationValues>
-
incorporateCertificateValues
protected void incorporateCertificateValues(Element parentDom, Collection<CertificateToken> certificatesToBeAdded, String indent) This method incorporates all certificates passed as parameter, as well as adds missing indents if the parameter is specified<xades:CertificateValues> <xades:EncapsulatedX509Certificate>MIIC9TC...</xades:EncapsulatedX509Certificate> ... </xades:CertificateValues>
- Parameters:
parentDom
- the parent elementcertificatesToBeAdded
- the certificates to be added into the signatureindent
-String
to add between elements (if not NULL)
-
incorporateRevocationValues
protected void incorporateRevocationValues(Element parentDom, Collection<CRLToken> crlsToAdd, Collection<OCSPToken> ocspsToAdd, String indent) This method incorporates revocation values, as well as adds missing indents if the parameter is specified:<xades:RevocationValues>
-
removeOldCertificateValues
-
removeOldRevocationValues
protected void removeOldRevocationValues()This method removes old revocation values from the unsigned signature properties element. -
removeLastTimestampValidationData
This method removes the timestamp validation data of the last archive timestamp.- Returns:
- indent of the last
TimeStampValidationData
xml element, if present
-
incorporateTimestampValidationData
protected void incorporateTimestampValidationData(ValidationData validationDataForInclusion, String indent) This method incorporates the timestamp validation data in the signature- Parameters:
validationDataForInclusion
-ValidationData
to be included into the signatureindent
-String
-
incorporateArchiveTimestamp
protected void incorporateArchiveTimestamp()This method incorporate timestamp type object. -
createXAdESTimeStampType
protected void createXAdESTimeStampType(TimestampType timestampType, String timestampC14nMethod, DSSMessageDigest messageDigest) throws DSSException Creates any XAdES TimeStamp object representation. The timestamp token is obtained from TSP source- Parameters:
timestampType
-TimestampType
timestampC14nMethod
- canonicalization methodmessageDigest
-DSSMessageDigest
representing the message-imprint digest to timestamp- Throws:
DSSException
- in case of any error
-
assertDetachedDocumentsContainBinaries
protected void assertDetachedDocumentsContainBinaries()Checks if the detached content represented by binary documents (used for -LTA level extension)
-