Package eu.europa.esig.dss.xades
Class XAdESSignatureParameters
- java.lang.Object
-
- eu.europa.esig.dss.model.AbstractSerializableSignatureParameters
-
- eu.europa.esig.dss.AbstractSignatureParameters
-
- eu.europa.esig.dss.xades.XAdESSignatureParameters
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ASiCWithXAdESSignatureParameters
public class XAdESSignatureParameters extends AbstractSignatureParameters
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description XAdESSignatureParameters()
-
Method Summary
Modifier and Type Method Description ProfileParametersgetContext()StringgetKeyInfoCanonicalizationMethod()Returns the canonicalization algorithm used for dealing with KeyInfoList<DSSReference>getReferences()DocumentgetRootDocument()byte[]getSignedAdESObject()StringgetSignedInfoCanonicalizationMethod()StringgetSignedPropertiesCanonicalizationMethod()DigestAlgorithmgetSigningCertificateDigestMethod()StringgetXPathLocationString()booleanisAddX509SubjectName()booleanisEmbedXML()booleanisEn319132()booleanisManifestSignature()booleanisPrettyPrint()booleanisSignKeyInfo()Returns value value specifying if "KeyInfo" element should be signed.voidsetAddX509SubjectName(boolean addX509SubjectName)voidsetEmbedXML(boolean embedXML)voidsetEn319132(boolean en319132)voidsetKeyInfoCanonicalizationMethod(String keyInfoCanonicalizationMethod)Set the canonicalization algorithm used for dealing with KeyInfo.voidsetManifestSignature(boolean manifestSignature)voidsetPrettyPrint(boolean prettyPrint)voidsetReferences(List<DSSReference> references)voidsetRootDocument(Document rootDocument)voidsetSignatureLevel(SignatureLevel signatureLevel)Set signature level.voidsetSignedAdESObject(byte[] signedAdESObject)voidsetSignedInfoCanonicalizationMethod(String signedInfoCanonicalizationMethod)Set the canonicalization algorithm to be used when dealing with SignedInfo.voidsetSignedPropertiesCanonicalizationMethod(String signedPropertiesCanonicalizationMethod)Set the canonicalization algorithm to be used when dealing with SignedProperties.voidsetSigningCertificateDigestMethod(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.voidsetSignKeyInfo(boolean signKeyInfo)Set the parameter SignKeyInfo defining if the "KeyInfo" element must be signed and its reference must be included to "SignedInfo" element.voidsetXPathLocationString(String xPathLocationString)Defines the area where the signature will be added (XAdES Enveloped)-
Methods inherited from class eu.europa.esig.dss.AbstractSignatureParameters
clearCertificateChain, 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, getArchiveTimestampParameters, getContentTimestampParameters, getDigestAlgorithm, getEncryptionAlgorithm, getMaskGenerationFunction, getReferenceDigestAlgorithm, getSignatureAlgorithm, getSignatureLevel, getSignaturePackaging, getSignatureTimestampParameters, hashCode, isGenerateTBSWithoutCertificate, isSignWithExpiredCertificate, setArchiveTimestampParameters, setBLevelParams, setContentTimestampParameters, setDigestAlgorithm, setEncryptionAlgorithm, setGenerateTBSWithoutCertificate, setMaskGenerationFunction, setReferenceDigestAlgorithm, setSignaturePackaging, setSignatureTimestampParameters, setSignWithExpiredCertificate, toString
-
-
-
-
Method Detail
-
setSignatureLevel
public void setSignatureLevel(SignatureLevel signatureLevel)
Description copied from class:AbstractSerializableSignatureParametersSet signature level. This field cannot be null.- Overrides:
setSignatureLevelin classAbstractSerializableSignatureParameters- Parameters:
signatureLevel- the expected signature level
-
setSigningCertificateDigestMethod
public 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.- Parameters:
signingCertificateDigestMethod-
-
getSigningCertificateDigestMethod
public DigestAlgorithm getSigningCertificateDigestMethod()
- Returns:
-
getSignedInfoCanonicalizationMethod
public String getSignedInfoCanonicalizationMethod()
- Returns:
- the canonicalization algorithm to be used when dealing with SignedInfo.
-
setSignedInfoCanonicalizationMethod
public void setSignedInfoCanonicalizationMethod(String signedInfoCanonicalizationMethod)
Set the canonicalization algorithm to be used when dealing with SignedInfo.- Parameters:
signedInfoCanonicalizationMethod- the canonicalization algorithm to be used when dealing with SignedInfo.
-
getSignedPropertiesCanonicalizationMethod
public String 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
public String getKeyInfoCanonicalizationMethod()
Returns the canonicalization algorithm used for dealing with KeyInfo- Returns:
- - name of the canonicalization algorithm
-
setKeyInfoCanonicalizationMethod
public void setKeyInfoCanonicalizationMethod(String keyInfoCanonicalizationMethod)
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
public List<DSSReference> getReferences()
-
setReferences
public void setReferences(List<DSSReference> references)
-
getXPathLocationString
public String getXPathLocationString()
-
setXPathLocationString
public void setXPathLocationString(String xPathLocationString)
Defines the area where the signature will be added (XAdES Enveloped)- Parameters:
xPathLocationString- the xpath location of the signature
-
getRootDocument
public Document getRootDocument()
-
setRootDocument
public void setRootDocument(Document rootDocument)
-
getContext
public ProfileParameters 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)
-
-