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:
eu.europa.esig.dss.signature.SignatureExtension<XAdESSignatureParameters>
- Direct Known Subclasses:
XAdESLevelBaselineLT,XAdESLevelC
public class XAdESLevelBaselineT
extends ExtensionBuilder
implements eu.europa.esig.dss.signature.SignatureExtension<XAdESSignatureParameters>
-T profile of XAdES signature
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected eu.europa.esig.dss.spi.x509.tsp.TSPSourceThe 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, xadesSignatureFields inherited from class eu.europa.esig.dss.xades.signature.XAdESBuilder
ANY_VD_PREFIX, certificateVerifier, documentDom, ENCAPSULATED_TIMESTAMP_PREFIX, ID_PREFIX, params, REFERENCED_DATA, TARGET, TIMESTAMP_PREFIX, TST_VD_PREFIX, URI, xadesPath -
Constructor Summary
ConstructorsConstructorDescriptionXAdESLevelBaselineT(eu.europa.esig.dss.spi.validation.CertificateVerifier certificateVerifier) The default constructor for XAdESLevelBaselineT. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidChecks if the detached content represented by binary documents (used for -LTA level extension)protected voidcreateXAdESTimeStampType(eu.europa.esig.dss.enumerations.TimestampType timestampType, String timestampC14nMethod, eu.europa.esig.dss.model.DSSMessageDigest messageDigest) Creates any XAdES TimeStamp object representation.eu.europa.esig.dss.model.DSSDocumentextendSignatures(eu.europa.esig.dss.model.DSSDocument dssDocument, XAdESSignatureParameters params) protected voidextendSignatures(List<eu.europa.esig.dss.spi.signature.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 eu.europa.esig.dss.signature.SignatureRequirementsCheckerInstantiates aSignatureRequirementsCheckerprotected voidincorporateAnyValidationData(eu.europa.esig.dss.spi.validation.ValidationData validationDataForInclusion, String indent) This method incorporates the AnyValidationData in the signatureprotected voidThis method incorporate timestamp type object.protected ElementincorporateCertificateValues(Element parentDom, Collection<eu.europa.esig.dss.model.x509.CertificateToken> certificatesToBeAdded) This method incorporates all certificates passed as parameter :protected voidincorporateCertificateValues(Element parentDom, Collection<eu.europa.esig.dss.model.x509.CertificateToken> certificatesToBeAdded, String indent) This method incorporates all certificates passed as parameter, as well as adds missing indents if the parameter is specifiedprotected ElementincorporateRevocationValues(Element parentDom, Collection<eu.europa.esig.dss.spi.x509.revocation.crl.CRLToken> crlsToAdd, Collection<eu.europa.esig.dss.spi.x509.revocation.ocsp.OCSPToken> ocspsToAdd) This method incorporates revocation values.protected voidincorporateRevocationValues(Element parentDom, Collection<eu.europa.esig.dss.spi.x509.revocation.crl.CRLToken> crlsToAdd, Collection<eu.europa.esig.dss.spi.x509.revocation.ocsp.OCSPToken> ocspsToAdd, String indent) This method incorporates revocation values, as well as adds missing indents if the parameter is specified:protected voidincorporateTimestampValidationData(eu.europa.esig.dss.spi.validation.ValidationData validationDataForInclusion, String indent) This method incorporates the timestamp validation data in the signatureprotected voidincorporateValidationData(eu.europa.esig.dss.spi.validation.ValidationData validationDataForInclusion, String indent, eu.europa.esig.dss.xml.common.definition.DSSElement element, String prefix) This method incorporates the timestamp validation data in the signatureprotected StringThis method removes the TimeStampValidationData and AnyValidationData elements appearing in the end of the unsigned properties.protected StringThis method removes old certificate values from the unsigned signature properties element.protected voidThis method removes old revocation values from the unsigned signature properties element.voidsetTspSource(eu.europa.esig.dss.spi.x509.tsp.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, removeNodesMethods 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
protected eu.europa.esig.dss.spi.x509.tsp.TSPSource tspSourceThe object encapsulating the Time Stamp Protocol needed to create the level -T, of the signature
-
-
Constructor Details
-
XAdESLevelBaselineT
public XAdESLevelBaselineT(eu.europa.esig.dss.spi.validation.CertificateVerifier certificateVerifier) The default constructor for XAdESLevelBaselineT.- Parameters:
certificateVerifier-CertificateVerifier
-
-
Method Details
-
extendSignatures
public eu.europa.esig.dss.model.DSSDocument extendSignatures(eu.europa.esig.dss.model.DSSDocument dssDocument, XAdESSignatureParameters params) throws eu.europa.esig.dss.model.DSSException - Specified by:
extendSignaturesin interfaceeu.europa.esig.dss.signature.SignatureExtension<XAdESSignatureParameters>- Throws:
eu.europa.esig.dss.model.DSSException
-
extendSignatures
protected void extendSignatures(List<eu.europa.esig.dss.spi.signature.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. The timestamp token is obtained from TSP source.
Adds<SignatureTimeStamp>segment into<UnsignedSignatureProperties>element.- Parameters:
signatures- a list ofAdvancedSignatures to extend
-
getSignatureRequirementsChecker
protected eu.europa.esig.dss.signature.SignatureRequirementsChecker getSignatureRequirementsChecker()Instantiates aSignatureRequirementsChecker- Returns:
SignatureRequirementsChecker
-
setTspSource
public void setTspSource(eu.europa.esig.dss.spi.x509.tsp.TSPSource tspSource) 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<eu.europa.esig.dss.model.x509.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 ofCertificateTokens to be added into the signature values element- Returns:
Elementincorporated signature values element
-
incorporateRevocationValues
protected Element incorporateRevocationValues(Element parentDom, Collection<eu.europa.esig.dss.spi.x509.revocation.crl.CRLToken> crlsToAdd, Collection<eu.europa.esig.dss.spi.x509.revocation.ocsp.OCSPToken> ocspsToAdd) This method incorporates revocation values.<xades:RevocationValues>- Parameters:
parentDom- the parent elementcrlsToAdd- a collection ofCRLTokens to be added into the signatureocspsToAdd- a collection ofOCSPTokens to be added into the signature- Returns:
Elementincorporated revocation values element
-
incorporateCertificateValues
protected void incorporateCertificateValues(Element parentDom, Collection<eu.europa.esig.dss.model.x509.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-Stringto add between elements (if not NULL)
-
incorporateRevocationValues
protected void incorporateRevocationValues(Element parentDom, Collection<eu.europa.esig.dss.spi.x509.revocation.crl.CRLToken> crlsToAdd, Collection<eu.europa.esig.dss.spi.x509.revocation.ocsp.OCSPToken> ocspsToAdd, String indent) This method incorporates revocation values, as well as adds missing indents if the parameter is specified:<xades:RevocationValues>- Parameters:
parentDom- the parent elementcrlsToAdd- a collection ofCRLTokens to be added into the signatureocspsToAdd- a collection ofOCSPTokens to be added into the signatureindent-Stringto add between elements (if not NULL)
-
removeOldCertificateValues
-
removeOldRevocationValues
protected void removeOldRevocationValues()This method removes old revocation values from the unsigned signature properties element. -
removeLastTimestampAndAnyValidationData
This method removes the TimeStampValidationData and AnyValidationData elements appearing in the end of the unsigned properties.- Returns:
- indent of the last
TimeStampValidationDataorAnyValidationDataxml element, if any present
-
incorporateTimestampValidationData
protected void incorporateTimestampValidationData(eu.europa.esig.dss.spi.validation.ValidationData validationDataForInclusion, String indent) This method incorporates the timestamp validation data in the signature- Parameters:
validationDataForInclusion-ValidationDatato be included into the signatureindent-String
-
incorporateAnyValidationData
protected void incorporateAnyValidationData(eu.europa.esig.dss.spi.validation.ValidationData validationDataForInclusion, String indent) This method incorporates the AnyValidationData in the signature- Parameters:
validationDataForInclusion-ValidationDatato be included into the signatureindent-String
-
incorporateValidationData
-
incorporateArchiveTimestamp
protected void incorporateArchiveTimestamp()This method incorporate timestamp type object. -
createXAdESTimeStampType
protected void createXAdESTimeStampType(eu.europa.esig.dss.enumerations.TimestampType timestampType, String timestampC14nMethod, eu.europa.esig.dss.model.DSSMessageDigest messageDigest) throws eu.europa.esig.dss.model.DSSException Creates any XAdES TimeStamp object representation. The timestamp token is obtained from TSP source- Parameters:
timestampType-TimestampTypetimestampC14nMethod- canonicalization methodmessageDigest-DSSMessageDigestrepresenting the message-imprint digest to timestamp- Throws:
eu.europa.esig.dss.model.DSSException- in case of any error
-
assertDetachedDocumentsContainBinaries
protected void assertDetachedDocumentsContainBinaries()Checks if the detached content represented by binary documents (used for -LTA level extension)
-