Package eu.europa.esig.dss.xades
Class XAdESSignatureParameters
java.lang.Object
eu.europa.esig.dss.model.AbstractSerializableSignatureParameters<TP>
eu.europa.esig.dss.AbstractSignatureParameters<XAdESTimestampParameters>
eu.europa.esig.dss.xades.XAdESSignatureParameters
- All Implemented Interfaces:
SerializableSignatureParameters
,Serializable
- Direct Known Subclasses:
ASiCWithXAdESSignatureParameters
public class XAdESSignatureParameters extends AbstractSignatureParameters<XAdESTimestampParameters>
- See Also:
- Serialized Form
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
XAdESSignatureParameters.XPathElementPlacement
-
Field Summary
Fields inherited from class eu.europa.esig.dss.model.AbstractSerializableSignatureParameters
archiveTimestampParameters, contentTimestampParameters, signatureTimestampParameters
-
Constructor Summary
Constructors Constructor Description XAdESSignatureParameters()
-
Method Summary
Modifier and Type Method Description XAdESTimestampParameters
getArchiveTimestampParameters()
Get the parameters for achive timestamp (Baseline-LTA)XAdESTimestampParameters
getContentTimestampParameters()
Get the parameters for content timestamp (Baseline-B)ProfileParameters
getContext()
String
getKeyInfoCanonicalizationMethod()
Returns the canonicalization algorithm used for dealing with KeyInfoList<DSSReference>
getReferences()
Document
getRootDocument()
XAdESTimestampParameters
getSignatureTimestampParameters()
Get the parameters for signature timestamp (Baseline-T)byte[]
getSignedAdESObject()
String
getSignedInfoCanonicalizationMethod()
String
getSignedPropertiesCanonicalizationMethod()
DigestAlgorithm
getSigningCertificateDigestMethod()
DSSNamespace
getXades141Namespace()
DSSNamespace
getXadesNamespace()
DSSNamespace
getXmldsigNamespace()
XAdESSignatureParameters.XPathElementPlacement
getXPathElementPlacement()
String
getXPathLocationString()
boolean
isAddX509SubjectName()
boolean
isEmbedXML()
boolean
isEn319132()
boolean
isManifestSignature()
boolean
isPrettyPrint()
boolean
isSignKeyInfo()
Returns value value specifying if "KeyInfo" element should be signed.void
setAddX509SubjectName(boolean addX509SubjectName)
void
setEmbedXML(boolean embedXML)
void
setEn319132(boolean en319132)
void
setKeyInfoCanonicalizationMethod(String keyInfoCanonicalizationMethod)
Set the canonicalization algorithm used for dealing with KeyInfo.void
setManifestSignature(boolean manifestSignature)
void
setPrettyPrint(boolean prettyPrint)
void
setReferences(List<DSSReference> references)
void
setRootDocument(Document rootDocument)
void
setSignatureLevel(SignatureLevel signatureLevel)
Set signature level.void
setSignedAdESObject(byte[] signedAdESObject)
void
setSignedInfoCanonicalizationMethod(String signedInfoCanonicalizationMethod)
Set the canonicalization algorithm to be used when dealing with SignedInfo.void
setSignedPropertiesCanonicalizationMethod(String signedPropertiesCanonicalizationMethod)
Set the canonicalization algorithm to be used when dealing with SignedProperties.void
setSigningCertificateDigestMethod(DigestAlgorithm signingCertificateDigestMethod)
This property is a part of the standard:
7.2.2 The SigningCertificate element (101 903 V1.4.2 (2010-12) XAdES)
The digest method indicates the digest algorithm to be used to calculate the CertDigest element that contains the digest for each certificate referenced in the sequence.void
setSignKeyInfo(boolean signKeyInfo)
Set the parameter SignKeyInfo defining if the "KeyInfo" element must be signed and its reference must be included to "SignedInfo" element.void
setXades141Namespace(DSSNamespace xades141Namespace)
void
setXadesNamespace(DSSNamespace xadesNamespace)
void
setXmldsigNamespace(DSSNamespace xmldsigNamespace)
void
setXPathElementPlacement(XAdESSignatureParameters.XPathElementPlacement xPathElementPlacement)
Defines the area where the signature will be added (XAdES Enveloped) in relation to the element referenced by the XPathvoid
setXPathLocationString(String xPathLocationString)
Defines the area where the signature will be added (XAdES Enveloped)Methods inherited from class eu.europa.esig.dss.AbstractSignatureParameters
getCertificateChain, getContentTimestamps, getDetachedContents, getDeterministicId, getSignedData, getSigningCertificate, reinitDeterministicId, setCertificateChain, setCertificateChain, setContentTimestamps, setDetachedContents, setSignedData, setSigningCertificate
Methods inherited from class eu.europa.esig.dss.model.AbstractSerializableSignatureParameters
bLevel, equals, getDigestAlgorithm, getEncryptionAlgorithm, getMaskGenerationFunction, getReferenceDigestAlgorithm, getSignatureAlgorithm, getSignatureLevel, getSignaturePackaging, hashCode, isGenerateTBSWithoutCertificate, isSignWithExpiredCertificate, setArchiveTimestampParameters, setBLevelParams, setContentTimestampParameters, setDigestAlgorithm, setEncryptionAlgorithm, setGenerateTBSWithoutCertificate, setMaskGenerationFunction, setReferenceDigestAlgorithm, setSignaturePackaging, setSignatureTimestampParameters, setSignWithExpiredCertificate, toString
-
Constructor Details
-
XAdESSignatureParameters
public XAdESSignatureParameters()
-
-
Method Details
-
setSignatureLevel
Description copied from class:AbstractSerializableSignatureParameters
Set signature level. This field cannot be null.- Overrides:
setSignatureLevel
in classAbstractSerializableSignatureParameters<XAdESTimestampParameters>
- Parameters:
signatureLevel
- the expected signature level
-
setSigningCertificateDigestMethod
This property is a part of the standard:
7.2.2 The SigningCertificate element (101 903 V1.4.2 (2010-12) XAdES)
The digest method indicates the digest algorithm to be used to calculate the CertDigest element that contains the digest for each certificate referenced in the sequence.- Parameters:
signingCertificateDigestMethod
-
-
getSigningCertificateDigestMethod
- Returns:
-
getSignedInfoCanonicalizationMethod
- Returns:
- the canonicalization algorithm to be used when dealing with SignedInfo.
-
setSignedInfoCanonicalizationMethod
Set the canonicalization algorithm to be used when dealing with SignedInfo.- Parameters:
signedInfoCanonicalizationMethod
- the canonicalization algorithm to be used when dealing with SignedInfo.
-
getSignedPropertiesCanonicalizationMethod
- Returns:
- the canonicalization algorithm to be used when dealing with SignedProperties.
-
setSignedPropertiesCanonicalizationMethod
public void setSignedPropertiesCanonicalizationMethod(String signedPropertiesCanonicalizationMethod)Set the canonicalization algorithm to be used when dealing with SignedProperties.- Parameters:
signedPropertiesCanonicalizationMethod
- the canonicalization algorithm to be used when dealing with SignedInfo.
-
getKeyInfoCanonicalizationMethod
Returns the canonicalization algorithm used for dealing with KeyInfo- Returns:
- - name of the canonicalization algorithm
-
setKeyInfoCanonicalizationMethod
Set the canonicalization algorithm used for dealing with KeyInfo.- Parameters:
keyInfoCanonicalizationMethod
- - name of the canonicalization algorithm for dealing with KeyInfo.
-
isSignKeyInfo
public boolean isSignKeyInfo()Returns value value specifying if "KeyInfo" element should be signed.- Returns:
- TRUE if "KeyInfo" element must be signed, FALSE otherwise.
-
setSignKeyInfo
public void setSignKeyInfo(boolean signKeyInfo)Set the parameter SignKeyInfo defining if the "KeyInfo" element must be signed and its reference must be included to "SignedInfo" element. The value is FALSE by default.- Parameters:
signKeyInfo
- - if KeyInfo element should be signed
-
getReferences
-
setReferences
-
getXPathLocationString
-
setXPathLocationString
Defines the area where the signature will be added (XAdES Enveloped)- Parameters:
xPathLocationString
- the xpath location of the signature
-
getXPathElementPlacement
-
setXPathElementPlacement
public void setXPathElementPlacement(XAdESSignatureParameters.XPathElementPlacement xPathElementPlacement)Defines the area where the signature will be added (XAdES Enveloped) in relation to the element referenced by the XPath- Parameters:
xPathElementPlacement
- the xpath location of the signature
-
getRootDocument
-
setRootDocument
-
getContext
-
isEn319132
public boolean isEn319132() -
setEn319132
public void setEn319132(boolean en319132) -
isEmbedXML
public boolean isEmbedXML() -
setEmbedXML
public void setEmbedXML(boolean embedXML) -
isManifestSignature
public boolean isManifestSignature() -
setManifestSignature
public void setManifestSignature(boolean manifestSignature) -
isAddX509SubjectName
public boolean isAddX509SubjectName() -
setAddX509SubjectName
public void setAddX509SubjectName(boolean addX509SubjectName) -
getSignedAdESObject
public byte[] getSignedAdESObject() -
setSignedAdESObject
public void setSignedAdESObject(byte[] signedAdESObject) -
isPrettyPrint
public boolean isPrettyPrint() -
setPrettyPrint
public void setPrettyPrint(boolean prettyPrint) -
getXmldsigNamespace
-
setXmldsigNamespace
-
getXadesNamespace
-
setXadesNamespace
-
getXades141Namespace
-
setXades141Namespace
-
getContentTimestampParameters
Description copied from class:AbstractSerializableSignatureParameters
Get the parameters for content timestamp (Baseline-B)- Overrides:
getContentTimestampParameters
in classAbstractSerializableSignatureParameters<XAdESTimestampParameters>
- Returns:
- the parameters to produce a content timestamp
-
getSignatureTimestampParameters
Description copied from class:AbstractSerializableSignatureParameters
Get the parameters for signature timestamp (Baseline-T)- Overrides:
getSignatureTimestampParameters
in classAbstractSerializableSignatureParameters<XAdESTimestampParameters>
- Returns:
- the parameters to produce a signature timestamp
-
getArchiveTimestampParameters
Description copied from class:AbstractSerializableSignatureParameters
Get the parameters for achive timestamp (Baseline-LTA)- Overrides:
getArchiveTimestampParameters
in classAbstractSerializableSignatureParameters<XAdESTimestampParameters>
- Returns:
- the parameters to produce an archive timestamp
-