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
-
Fields inherited from class eu.europa.esig.dss.xades.signature.ExtensionBuilder
currentSignatureDom, qualifyingPropertiesDom, signedDataObjectPropertiesDom, signedPropertiesDom, unsignedPropertiesDom, unsignedSignaturePropertiesDom, xadesSignature
-
Fields inherited from class eu.europa.esig.dss.xades.signature.XAdESBuilder
ALGORITHM, certificateVerifier, documentDom, DS_CANONICALIZATION_METHOD, DS_DIGEST_METHOD, DS_DIGEST_VALUE, DS_KEY_INFO, DS_MANIFEST, DS_OBJECT, DS_REFERENCE, DS_SIGNATURE, DS_SIGNATURE_METHOD, DS_SIGNATURE_VALUE, DS_SIGNED_INFO, DS_TRANSFORM, DS_TRANSFORMS, DS_X509_CERTIFICATE, DS_X509_DATA, DS_X509_ISSUER_NAME, DS_X509_SERIAL_NUMBER, DS_X509_SUBJECT_NAME, DS_XPATH, ID, MIMETYPE, OBJECT_REFERENCE, params, QUALIFIER, REFERENCED_DATA, SIGNATURE, TARGET, TYPE, URI, XADES_ALL_DATA_OBJECTS_TIME_STAMP, XADES_ALL_SIGNED_DATA_OBJECTS, XADES_BY_KEY, XADES_BY_NAME, XADES_CERT, XADES_CERT_DIGEST, XADES_CERT_REFS, XADES_CERTIFICATE_VALUES, XADES_CERTIFIED_ROLE, XADES_CERTIFIED_ROLES, XADES_CERTIFIED_ROLES_V2, XADES_CITY, XADES_CLAIMED_ROLE, XADES_CLAIMED_ROLES, XADES_COMMITMENT_TYPE_ID, XADES_COMMITMENT_TYPE_INDICATION, XADES_COMPLETE_CERTIFICATE_REFS, XADES_COMPLETE_REVOCATION_REFS, XADES_COUNTER_SIGNATURE, XADES_COUNTRY_NAME, XADES_CRL_IDENTIFIER, XADES_CRL_REF, XADES_CRL_REFS, XADES_DATA_OBJECT_FORMAT, XADES_DESCRIPTION, XADES_DIGEST_ALG_AND_VALUE, XADES_ENCAPSULATED_TIME_STAMP, XADES_ENCAPSULATED_X509_CERTIFICATE, XADES_IDENTIFIER, XADES_INCLUDE, XADES_INDIVIDUAL_DATA_OBJECTS_TIME_STAMP, XADES_ISSUER, XADES_ISSUER_SERIAL, XADES_ISSUER_SERIAL_V2, XADES_ISSUER_TIME, XADES_MIME_TYPE, XADES_OCSP_IDENTIFIER, XADES_OCSP_REF, XADES_OCSP_REFS, XADES_OCSP_RESPONDER_ID, XADES_POSTAL_CODE, XADES_PRODUCED_AT, XADES_QUALIFYING_PROPERTIES, XADES_REVOCATION_VALUES, XADES_SIG_AND_REFS_TIME_STAMP, XADES_SIG_AND_REFS_TIME_STAMP_V2, XADES_SIG_POLICY_HASH, XADES_SIG_POLICY_ID, XADES_SIGNATURE_POLICY_ID, XADES_SIGNATURE_POLICY_IDENTIFIER, XADES_SIGNATURE_POLICY_IMPLIED, XADES_SIGNATURE_POLICY_QUALIFIER, XADES_SIGNATURE_POLICY_QUALIFIERS, XADES_SIGNATURE_PRODUCTION_PLACE, XADES_SIGNATURE_PRODUCTION_PLACE_V2, XADES_SIGNATURE_TIME_STAMP, XADES_SIGNED_DATA_OBJECT_PROPERTIES, XADES_SIGNED_PROPERTIES, XADES_SIGNED_SIGNATURE_PROPERTIES, XADES_SIGNER_ROLE, XADES_SIGNER_ROLE_V2, XADES_SIGNING_TIME, XADES_SPURI, XADES_STATE_OR_PROVINCE, XADES_STREET_ADDRESS, XADES_UNSIGNED_PROPERTIES, XADES_UNSIGNED_SIGNATURE_PROPERTIES, XADES141_ARCHIVE_TIME_STAMP, XADES141_TIME_STAMP_VALIDATION_DATA, XMLNS_DS, XMLNS_XADES, xPathQueryHolder
-
-
Constructor Summary
Constructors Constructor Description XAdESLevelBaselineT(CertificateVerifier certificateVerifier)The default constructor for XAdESLevelBaselineT.
-
Method Summary
Modifier and Type Method Description protected voidcreateXAdESTimeStampType(TimestampType timestampType, String timestampC14nMethod, byte[] digestValue)Creates any XAdES TimeStamp object representation.DSSDocumentextendSignatures(DSSDocument dssDocument, XAdESSignatureParameters params)Extends the level of the signatures contained in a document.protected voidextendSignatureTag()Extends the signature to a desired level.protected ElementincorporateCertificateValues(Element parentDom, ValidationContext validationContext)This method incorporates all certificates passed as parameter :protected voidincorporateCertificateValues(Element parentDom, ValidationContext validationContext, String indent)This method incorporates all certificates passed as parameter, as well as adds missing indents if the parameter is specifiedprotected ElementincorporateRevocationValues(Element parentDom, ValidationContext validationContext)This method incorporates revocation values.protected voidincorporateRevocationValues(Element parentDom, ValidationContext validationContext, String indent)This method incorporates revocation values, as well as adds missing indents if the parameter is specified:voidsetTspSource(TSPSource tspSource)Sets the TSP source to be used when extending the digital signature-
Methods inherited from class eu.europa.esig.dss.xades.signature.ExtensionBuilder
alignNodes, assertSignatureValid, ensureSignedDataObjectProperties, ensureUnsignedProperties, ensureUnsignedSignatureProperties, indentIfPrettyPrint, removeChild
-
Methods inherited from class eu.europa.esig.dss.xades.signature.XAdESBuilder
createXmlDocument, incorporateCert, incorporateCertificateRef, incorporateDigestMethod, incorporateDigestValue, incorporateDigestValue, incorporateIssuerV1, incorporateIssuerV2
-
-
-
-
Field Detail
-
tspSource
protected TSPSource tspSource
-
-
Constructor Detail
-
XAdESLevelBaselineT
public XAdESLevelBaselineT(CertificateVerifier certificateVerifier)
The default constructor for XAdESLevelBaselineT.
-
-
Method Detail
-
extendSignatures
public DSSDocument extendSignatures(DSSDocument dssDocument, XAdESSignatureParameters params) throws DSSException
Description copied from interface:SignatureExtensionExtends the level of the signatures contained in a document.- Specified by:
extendSignaturesin interfaceSignatureExtension<XAdESSignatureParameters>- Parameters:
dssDocument- The signed document to be signed- Returns:
- Throws:
DSSException
-
extendSignatureTag
protected void extendSignatureTag() throws DSSExceptionExtends the signature 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.- Throws:
DSSException
-
setTspSource
public void setTspSource(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, ValidationContext validationContext)
This method incorporates all certificates passed as parameter :<xades:CertificateValues> <xades:EncapsulatedX509Certificate>MIIC9TC...</xades:EncapsulatedX509Certificate> ... </xades:CertificateValues>- Parameters:
parentDom- the parent elementvalidationContext- the validation context with all certificates
-
incorporateRevocationValues
protected Element incorporateRevocationValues(Element parentDom, ValidationContext validationContext)
This method incorporates revocation values.<xades:RevocationValues>- Parameters:
parentDom- the parent elementvalidationContext- the validation context with the revocation data
-
incorporateCertificateValues
protected void incorporateCertificateValues(Element parentDom, ValidationContext validationContext, 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 elementvalidationContext- the validation context with all certificatesindent-Stringto add between elements (if not NULL)
-
incorporateRevocationValues
protected void incorporateRevocationValues(Element parentDom, ValidationContext validationContext, String indent)
This method incorporates revocation values, as well as adds missing indents if the parameter is specified:<xades:RevocationValues>- Parameters:
parentDom- the parent elementvalidationContext- the validation context with the revocation dataindent-Stringto add between elements (if not NULL)
-
createXAdESTimeStampType
protected void createXAdESTimeStampType(TimestampType timestampType, String timestampC14nMethod, byte[] digestValue) throws DSSException
Creates any XAdES TimeStamp object representation. The timestamp token is obtained from TSP source- Parameters:
timestampType-TimestampTypetimestampC14nMethod- canonicalization methoddigestValue- array ofbyterepresenting the digest to timestamp- Throws:
DSSException- in case of any error
-
-