Package eu.europa.esig.dss.jades
Class JAdESSignatureParameters
java.lang.Object
eu.europa.esig.dss.model.AbstractSerializableSignatureParameters<TP>
eu.europa.esig.dss.AbstractSignatureParameters<JAdESTimestampParameters>
eu.europa.esig.dss.jades.JAdESSignatureParameters
- All Implemented Interfaces:
SerializableSignatureParameters
,Serializable
- Direct Known Subclasses:
JAdESCounterSignatureParameters
public class JAdESSignatureParameters extends AbstractSignatureParameters<JAdESTimestampParameters>
The parameters to create/extend a JAdES signature
- See Also:
- Serialized Form
-
Field Summary
Fields inherited from class eu.europa.esig.dss.AbstractSignatureParameters
deterministicId
Fields inherited from class eu.europa.esig.dss.model.AbstractSerializableSignatureParameters
archiveTimestampParameters, contentTimestampParameters, signatureTimestampParameters
-
Constructor Summary
Constructors Constructor Description JAdESSignatureParameters()
-
Method Summary
Modifier and Type Method Description JAdESTimestampParameters
getArchiveTimestampParameters()
Get the parameters for achive timestamp (Baseline-LTA)JAdESTimestampParameters
getContentTimestampParameters()
Get the parameters for content timestamp (Baseline-B)JWSSerializationType
getJwsSerializationType()
Gets JWSSerializationTypeSigDMechanism
getSigDMechanism()
Returns a SigDMechanism to useJAdESTimestampParameters
getSignatureTimestampParameters()
Get the parameters for signature timestamp (Baseline-T)DigestAlgorithm
getSigningCertificateDigestMethod()
boolean
isBase64UrlEncodedEtsiUComponents()
Gets if the instances of the 'etsiU' unprotected header shall appear in their corresponding base64url encoding Default : TRUE (base64Url encoded etsiU components will be used)boolean
isBase64UrlEncodedPayload()
Gets if base64Url encoded payload shall be usedboolean
isIncludeCertificateChain()
Defines if complete certificate chain binaries must be included into the signed header ('x5c' attribute)boolean
isIncludeSignatureType()
Defines if the signature MimeType string must be included into the signed header ('typ' attribute)void
setBase64UrlEncodedEtsiUComponents(boolean base64UrlEncodedEtsiUComponents)
Sets if the instances of the 'etsiU' header shall appear in their corresponding base64url encoding.void
setBase64UrlEncodedPayload(boolean base64EncodedPayload)
Sets if base64Url encoded payload shall be used If FALSE, the unencoded (original) payload will be used according to RFC 7797 NOTE: some restrictions for payload content can apply when dealing with unencoded payload.void
setIncludeCertificateChain(boolean includeCertificateChain)
Sets if complete certificate chain binaries must be included into the signed header Default: TRUE (the complete binaries will be included into the signed header)void
setIncludeSignatureType(boolean includeSignatureType)
Sets if the signature MimeType string must be included into the signed header ('typ' attribute) Default: TRUE (the signature MimeType will be included into the signed header)void
setJwsSerializationType(JWSSerializationType jwsSerializationType)
Sets the JWSSerializationType Default: JWSSerializationType.COMPACT_SERIALIZATIONvoid
setSigDMechanism(SigDMechanism sigDMechanism)
Sets SigDMechanism to use for a Detached signaturevoid
setSigningCertificateDigestMethod(DigestAlgorithm signingCertificateDigestMethod)
The digest method indicates the digest algorithm to be used to calculate the certificate digest to define a signing certificate ('x5t#256' for SHA256 or 'x5t#o' for other algorithms) Default: DigestAlgorithm.SHA256 ('x5t#256' attribute will be created)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, setSignatureLevel, setSignaturePackaging, setSignatureTimestampParameters, setSignWithExpiredCertificate, toString
-
Constructor Details
-
JAdESSignatureParameters
public JAdESSignatureParameters()
-
-
Method Details
-
getContentTimestampParameters
Description copied from class:AbstractSerializableSignatureParameters
Get the parameters for content timestamp (Baseline-B)- Overrides:
getContentTimestampParameters
in classAbstractSerializableSignatureParameters<JAdESTimestampParameters>
- 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<JAdESTimestampParameters>
- 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<JAdESTimestampParameters>
- Returns:
- the parameters to produce an archive timestamp
-
isIncludeCertificateChain
public boolean isIncludeCertificateChain()Defines if complete certificate chain binaries must be included into the signed header ('x5c' attribute)- Returns:
- TRUE if the certificate chain must be included, FALSE otherwise
-
setIncludeCertificateChain
public void setIncludeCertificateChain(boolean includeCertificateChain)Sets if complete certificate chain binaries must be included into the signed header Default: TRUE (the complete binaries will be included into the signed header)- Parameters:
includeCertificateChain
- if the certificate chain binaries must be included into the signed header
-
isIncludeSignatureType
public boolean isIncludeSignatureType()Defines if the signature MimeType string must be included into the signed header ('typ' attribute)- Returns:
- TRUE if the MimeType string of the produced signature must be included, FALSE otherwise
-
setIncludeSignatureType
public void setIncludeSignatureType(boolean includeSignatureType)Sets if the signature MimeType string must be included into the signed header ('typ' attribute) Default: TRUE (the signature MimeType will be included into the signed header)- Parameters:
includeSignatureType
- if the signature MimeType be included into the signed header
-
getSigningCertificateDigestMethod
- Returns:
DigestAlgorithm
to be used for signing certificate digest representation
-
setSigningCertificateDigestMethod
The digest method indicates the digest algorithm to be used to calculate the certificate digest to define a signing certificate ('x5t#256' for SHA256 or 'x5t#o' for other algorithms) Default: DigestAlgorithm.SHA256 ('x5t#256' attribute will be created)- Parameters:
signingCertificateDigestMethod
-DigestAlgorithm
to be used
-
getJwsSerializationType
Gets JWSSerializationType- Returns:
JWSSerializationType
-
setJwsSerializationType
Sets the JWSSerializationType Default: JWSSerializationType.COMPACT_SERIALIZATION- Parameters:
jwsSerializationType
-JWSSerializationType
-
getSigDMechanism
Returns a SigDMechanism to use- Returns:
SigDMechanism
-
setSigDMechanism
Sets SigDMechanism to use for a Detached signature- Parameters:
sigDMechanism
-SigDMechanism
-
isBase64UrlEncodedPayload
public boolean isBase64UrlEncodedPayload()Gets if base64Url encoded payload shall be used- Returns:
- TRUE if to use base64url encoded payload, FALSE otherwise
-
setBase64UrlEncodedPayload
public void setBase64UrlEncodedPayload(boolean base64EncodedPayload)Sets if base64Url encoded payload shall be used If FALSE, the unencoded (original) payload will be used according to RFC 7797 NOTE: some restrictions for payload content can apply when dealing with unencoded payload. For more information please see RFC 7797. The parameter is independent frombase64UrlEncodedEtsiUComponents
Default : TRUE (base64Url encoded payload will be used)- Parameters:
base64EncodedPayload
- true if the payload shall be present in its corresponding base64url encoding, FALSE otherwise
-
isBase64UrlEncodedEtsiUComponents
public boolean isBase64UrlEncodedEtsiUComponents()Gets if the instances of the 'etsiU' unprotected header shall appear in their corresponding base64url encoding Default : TRUE (base64Url encoded etsiU components will be used)- Returns:
- TRUE if the components of 'etsiU' header shall appear in their corresponding base64url encoding, otherwise in their clear JSON incorporation
-
setBase64UrlEncodedEtsiUComponents
public void setBase64UrlEncodedEtsiUComponents(boolean base64UrlEncodedEtsiUComponents)Sets if the instances of the 'etsiU' header shall appear in their corresponding base64url encoding. If FALSE the components of 'etsiU' will appear in their clear JSON incorporation. The parameter is used for Serialization (or Flattened) format only with unsigned properties. NOTE: the parameter is independent frombase64UrlEncodedPayload
Default : TRUE (base64url encoded etsiU components)- Parameters:
base64UrlEncodedEtsiUComponents
- if the components of 'etsiU' unsigned header shall appear in their corresponding base64url encoding, if FALSE the components will appear in their clear JSON incorporation
-