Package eu.europa.esig.dss.cades
Class CAdESSignatureParameters
java.lang.Object
eu.europa.esig.dss.model.AbstractSerializableSignatureParameters<CAdESTimestampParameters>
eu.europa.esig.dss.signature.AbstractSignatureParameters<CAdESTimestampParameters>
eu.europa.esig.dss.cades.CAdESSignatureParameters
- All Implemented Interfaces:
SerializableSignatureParameters
,Serializable
- Direct Known Subclasses:
ASiCWithCAdESSignatureParameters
,CAdESCounterSignatureParameters
,PAdESSignatureParameters
Defines SignatureParameters to deal with CAdES signature creation/extension
- See Also:
-
Field Summary
Fields inherited from class eu.europa.esig.dss.signature.AbstractSignatureParameters
context
Fields inherited from class eu.europa.esig.dss.model.AbstractSerializableSignatureParameters
archiveTimestampParameters, contentTimestampParameters, signatureTimestampParameters
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor instantiating object with null values -
Method Summary
Modifier and TypeMethodDescriptionboolean
Get the parameters for archive timestamp (Baseline-LTA)Gets content hints descriptionGets content hints typeETSI TS 101 733 V2.2.1 (2013-04) 5.10.2 content-identifier Attribute The content-identifier attribute provides an identifier for the signed content, for use when a reference may be later required to that content; for example, in the content-reference attribute in other signed data sent later.ETSI TS 101 733 V2.2.1 (2013-04) 5.10.2 content-identifier Attribute The content-identifier attribute provides an identifier for the signed content, for use when a reference may be later required to that content; for example, in the content-reference attribute in other signed data sent later.Get the parameters for content timestamp (Baseline-B)Get the parameters for signature timestamp (Baseline-T)int
hashCode()
boolean
Returns if the signature shall be created according to ETSI EN 319 122boolean
Returns whether a parallel signature should be created when an original document is represented by a CMSSignedData (i.e. another CMS signature document)void
setContentHintsDescription
(String contentHintsDescription) Sets content hints descriptionvoid
setContentHintsType
(String contentHintsType) Sets content hints typevoid
setContentIdentifierPrefix
(String contentIdentifierPrefix) Sets content identifier prefixvoid
setContentIdentifierSuffix
(String contentIdentifierSuffix) Sets content identifier suffix.void
setEn319122
(boolean en319122) Sets if the signature shall be created according to ETSI EN 319 122, otherwise will be created with respect to the old standard Default: truevoid
setParallelSignature
(boolean parallelSignature) Sets whether a parallel signature should be created in case the provided documentToSign is represented by a CMSSignedData (i.e. another CMS signature document).toString()
Methods inherited from class eu.europa.esig.dss.signature.AbstractSignatureParameters
getCertificateChain, getContentTimestamps, getContext, getDetachedContents, getDeterministicId, getSignedData, getSigningCertificate, reinit, setCertificateChain, setCertificateChain, setContentTimestamps, setDetachedContents, setSignedData, setSigningCertificate
Methods inherited from class eu.europa.esig.dss.model.AbstractSerializableSignatureParameters
bLevel, getDigestAlgorithm, getEncryptionAlgorithm, getReferenceDigestAlgorithm, getSignatureAlgorithm, getSignatureLevel, getSignaturePackaging, getValidationDataEncapsulationStrategy, isCheckCertificateRevocation, isGenerateTBSWithoutCertificate, setArchiveTimestampParameters, setBLevelParams, setCheckCertificateRevocation, setContentTimestampParameters, setDigestAlgorithm, setEncryptionAlgorithm, setGenerateTBSWithoutCertificate, setReferenceDigestAlgorithm, setSignatureLevel, setSignaturePackaging, setSignatureTimestampParameters, setValidationDataEncapsulationStrategy
-
Constructor Details
-
CAdESSignatureParameters
public CAdESSignatureParameters()Default constructor instantiating object with null values
-
-
Method Details
-
isEn319122
public boolean isEn319122()Returns if the signature shall be created according to ETSI EN 319 122- Returns:
- TRUE if the signature shall be created according to ETSI EN 319 122, otherwise as an old format
-
setEn319122
public void setEn319122(boolean en319122) Sets if the signature shall be created according to ETSI EN 319 122, otherwise will be created with respect to the old standard Default: true- Parameters:
en319122
- if the signature shall be created according to ETSI EN 319 122
-
getContentHintsType
-
setContentHintsType
-
getContentHintsDescription
-
setContentHintsDescription
-
getContentIdentifierSuffix
ETSI TS 101 733 V2.2.1 (2013-04) 5.10.2 content-identifier Attribute The content-identifier attribute provides an identifier for the signed content, for use when a reference may be later required to that content; for example, in the content-reference attribute in other signed data sent later. The content-identifier shall be a signed attribute. content-identifier attribute type values for the ES have an ASN.1 type ContentIdentifier, as defined in ESS (RFC 2634 [5]). The minimal content-identifier attribute should contain a concatenation of user-specific identification information (such as a user name or public keying material identification information), a GeneralizedTime string, and a random number.- Returns:
String
-
setContentIdentifierSuffix
-
getContentIdentifierPrefix
ETSI TS 101 733 V2.2.1 (2013-04) 5.10.2 content-identifier Attribute The content-identifier attribute provides an identifier for the signed content, for use when a reference may be later required to that content; for example, in the content-reference attribute in other signed data sent later. The content-identifier shall be a signed attribute. content-identifier attribute type values for the ES have an ASN.1 type ContentIdentifier, as defined in ESS (RFC 2634 [5]). The minimal content-identifier attribute should contain a concatenation of user-specific identification information (such as a user name or public keying material identification information), a GeneralizedTime string, and a random number.- Returns:
String
-
setContentIdentifierPrefix
-
isParallelSignature
public boolean isParallelSignature()Returns whether a parallel signature should be created when an original document is represented by a CMSSignedData (i.e. another CMS signature document)- Returns:
- whether a parallel signing is expected
-
setParallelSignature
public void setParallelSignature(boolean parallelSignature) Sets whether a parallel signature should be created in case the provided documentToSign is represented by a CMSSignedData (i.e. another CMS signature document). When enabled, the created produced document will be build based on the original CMSSignedData content, and the new signature will be included inside the CMSSignedData as a parallel signature, next to existing signatures. When disabled, the new signature will cover the binaries of the original CMSSignedData, as in case of a not-signed original document. This allows creation of nested CMS signatures. When a non CMSSignedData document is provided, the parameter does not impact the processing. Default : TRUE (creates a parallel signature, when applicable)- Parameters:
parallelSignature
- whether a parallel signature should be created in case the provided documentToSign is represented by a CMSSignedData
-
getContentTimestampParameters
Description copied from class:AbstractSerializableSignatureParameters
Get the parameters for content timestamp (Baseline-B)- Overrides:
getContentTimestampParameters
in classAbstractSerializableSignatureParameters<CAdESTimestampParameters>
- 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<CAdESTimestampParameters>
- Returns:
- the parameters to produce a signature timestamp
-
getArchiveTimestampParameters
Description copied from class:AbstractSerializableSignatureParameters
Get the parameters for archive timestamp (Baseline-LTA)- Overrides:
getArchiveTimestampParameters
in classAbstractSerializableSignatureParameters<CAdESTimestampParameters>
- Returns:
- the parameters to produce an archive timestamp
-
toString
- Overrides:
toString
in classAbstractSignatureParameters<CAdESTimestampParameters>
-
equals
- Overrides:
equals
in classAbstractSignatureParameters<CAdESTimestampParameters>
-
hashCode
public int hashCode()- Overrides:
hashCode
in classAbstractSignatureParameters<CAdESTimestampParameters>
-