Class RemoteSignatureParameters
java.lang.Object
eu.europa.esig.dss.ws.signature.dto.parameters.RemoteSignatureParameters
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Get the parameters for achive timestamp (Baseline-LTA)Gets ASiC container typeGet Baseline B parameters (signed properties)Gets the certificate chainGet the parameters for content timestamp (Baseline-B)Gets a list of content timestampsGets the detached contentsGet the digest algorithmGet the encryption algorithmGet the image information to be included (PAdES).GetsJWSSerializationType
NOTE: used only for JAdESDeprecated.since DSS 6.1.Get the digest algorithm for ds:Reference or message-digest attributeGetsSigDMechanism
NOTE: used only for JAdES with DETACHED packagingDeprecated.since DSS 6.1.Returns a signature Id being counter signedGet signature level: XAdES_BASELINE_T, CAdES_BASELINE_LTA...Get Signature packagingGet the parameters for signature timestamp (Baseline-T)Gets the signing certificateint
hashCode()
boolean
Gets whether etsiU header components shall be base64url encoded NOTE: used only for JAdESboolean
Gets whether a payload shall be base64url encoded NOTE: used only for JAdESboolean
Returns if original XML document shall be embedded into ENVELOPING signature in its clear XML representationboolean
Indicates if it is possible to generate ToBeSigned data without the signing certificate.boolean
Returns if a manifest signature should be createdboolean
Deprecated.since DSS 6.1.void
setArchiveTimestampParameters
(RemoteTimestampParameters archiveTimestampParameters) Set the parameters to produce the archive timestamp (Baseline-LTA)void
setAsicContainerType
(ASiCContainerType asicContainerType) Sets ASiCContainerType for ASiC format creationvoid
setBase64UrlEncodedEtsiUComponents
(boolean base64UrlEncodedEtsiUComponents) Sets whether etsiU header components shall be base64url encoded NOTE: used only for JAdESvoid
setBase64UrlEncodedPayload
(boolean base64UrlEncodedPayload) Sets whether a payload shall be base64url encoded NOTE: used only for JAdESvoid
setBLevelParams
(RemoteBLevelParameters bLevelParams) Set the Baseline B parameters (signed properties)void
setCertificateChain
(List<RemoteCertificate> certificateChain) Sets the certificate chain of the signing certificatevoid
setContentTimestampParameters
(RemoteTimestampParameters contentTimestampParameters) Set the parameters to produce the content timestamp (Baseline-B)void
setContentTimestamps
(List<TimestampDTO> contentTimestamps) Sets a list of content timestamps to be added into the signaturevoid
setDetachedContents
(List<RemoteDocument> detachedContents) Sets a list of signed detached documentsvoid
setDigestAlgorithm
(DigestAlgorithm digestAlgorithm) Set the digest algorithmvoid
setEmbedXML
(boolean embedXML) Sets whether the original XML document shall be embedded in its XML representation NOTE: used only for XAdESvoid
setEncryptionAlgorithm
(EncryptionAlgorithm encryptionAlgorithm) This setter should be used only when dealing with web services (or when signing in three steps).void
setGenerateTBSWithoutCertificate
(boolean generateTBSWithoutCertificate) Allows to change the default behaviour regarding the requirements of signing certificate to generate ToBeSigned data.void
setImageParameters
(RemoteSignatureImageParameters imageParameters) Set the image information to be included (PAdES).void
setJwsSerializationType
(JWSSerializationType jwsSerializationType) SetsJWSSerializationType
void
setManifestSignature
(boolean manifestSignature) Sets whether a manifest signature shall be created NOTE: used only for XAdESvoid
setMaskGenerationFunction
(MaskGenerationFunction maskGenerationFunction) Deprecated.since DSS 6.1.void
setReferenceDigestAlgorithm
(DigestAlgorithm referenceDigestAlgorithm) Sets the digest algorithm for ds:Reference or message-digest attributevoid
setSigDMechanism
(SigDMechanism sigDMechanism) SetsSigDMechanism
NOTE: used only for JAdES with DETACHED packagingvoid
setSignatureAlgorithm
(SignatureAlgorithm signatureAlgorithm) Deprecated.since DSS 6.1.void
setSignatureIdToCounterSign
(String signatureIdToCounterSign) Sets the signature Id to counter signvoid
setSignatureLevel
(SignatureLevel signatureLevel) Set signature level.void
setSignaturePackaging
(SignaturePackaging signaturePackaging) Set Signature packagingvoid
setSignatureTimestampParameters
(RemoteTimestampParameters signatureTimestampParameters) Set the parameters to produce the signature timestamp (Baseline-T)void
setSigningCertificate
(RemoteCertificate signingCertificate) Sets the signing certificatevoid
setSignWithExpiredCertificate
(boolean signWithExpiredCertificate) Deprecated.since DSS 6.1.toString()
-
Constructor Details
-
RemoteSignatureParameters
public RemoteSignatureParameters()Default constructor
-
-
Method Details
-
getSigningCertificate
Gets the signing certificate- Returns:
RemoteCertificate
-
setSigningCertificate
Sets the signing certificate- Parameters:
signingCertificate
-RemoteCertificate
-
getCertificateChain
Gets the certificate chain- Returns:
- a list of
RemoteCertificate
s
-
setCertificateChain
Sets the certificate chain of the signing certificate- Parameters:
certificateChain
- a list ofRemoteCertificate
s
-
getDetachedContents
Gets the detached contents- Returns:
- a list of
RemoteDocument
s
-
setDetachedContents
Sets a list of signed detached documents- Parameters:
detachedContents
- a ist ofRemoteDocument
s
-
getAsicContainerType
-
setAsicContainerType
Sets ASiCContainerType for ASiC format creation- Parameters:
asicContainerType
-ASiCContainerType
-
getSignatureLevel
Get signature level: XAdES_BASELINE_T, CAdES_BASELINE_LTA...- Returns:
- the expected signature level
-
setSignatureLevel
Set signature level. This field cannot be null.- Parameters:
signatureLevel
- the expected signature level
-
isEmbedXML
public boolean isEmbedXML()Returns if original XML document shall be embedded into ENVELOPING signature in its clear XML representation- Returns:
- TRUE if the original document shall be embedded in its XML representation, FALSE of base64 encoded
-
setEmbedXML
public void setEmbedXML(boolean embedXML) Sets whether the original XML document shall be embedded in its XML representation NOTE: used only for XAdES- Parameters:
embedXML
- whether the original object shall be embedded as XML
-
isManifestSignature
public boolean isManifestSignature()Returns if a manifest signature should be created- Returns:
- TRUE if a signature signs an XML Manifest, FALSE otherwise
-
setManifestSignature
public void setManifestSignature(boolean manifestSignature) Sets whether a manifest signature shall be created NOTE: used only for XAdES- Parameters:
manifestSignature
- whether a manifest signature shall be created
-
getJwsSerializationType
GetsJWSSerializationType
NOTE: used only for JAdES- Returns:
JWSSerializationType
-
setJwsSerializationType
SetsJWSSerializationType
- Parameters:
jwsSerializationType
-JWSSerializationType
to use
-
getSigDMechanism
GetsSigDMechanism
NOTE: used only for JAdES with DETACHED packaging- Returns:
SigDMechanism
-
setSigDMechanism
SetsSigDMechanism
NOTE: used only for JAdES with DETACHED packaging- Parameters:
sigDMechanism
-SigDMechanism
to use
-
isBase64UrlEncodedPayload
public boolean isBase64UrlEncodedPayload()Gets whether a payload shall be base64url encoded NOTE: used only for JAdES- Returns:
- whether a JAdES payload shall be base64url encoded
-
setBase64UrlEncodedPayload
public void setBase64UrlEncodedPayload(boolean base64UrlEncodedPayload) Sets whether a payload shall be base64url encoded NOTE: used only for JAdES- Parameters:
base64UrlEncodedPayload
- whether a JAdES payload shall be base64url encoded
-
isBase64UrlEncodedEtsiUComponents
public boolean isBase64UrlEncodedEtsiUComponents()Gets whether etsiU header components shall be base64url encoded NOTE: used only for JAdES- Returns:
- whether JAdES etsiU header components shall be base64url encoded
-
setBase64UrlEncodedEtsiUComponents
public void setBase64UrlEncodedEtsiUComponents(boolean base64UrlEncodedEtsiUComponents) Sets whether etsiU header components shall be base64url encoded NOTE: used only for JAdES- Parameters:
base64UrlEncodedEtsiUComponents
- whether JAdES etsiU header components shall be base64url encoded
-
getReferenceDigestAlgorithm
Get the digest algorithm for ds:Reference or message-digest attribute- Returns:
- the digest algorithm for ds:Reference or message-digest attribute
-
setReferenceDigestAlgorithm
Sets the digest algorithm for ds:Reference or message-digest attribute- Parameters:
referenceDigestAlgorithm
-DigestAlgorithm
-
getBLevelParams
Get Baseline B parameters (signed properties)- Returns:
- the Baseline B parameters
-
setBLevelParams
Set the Baseline B parameters (signed properties)- Parameters:
bLevelParams
- the baseline B properties
-
getSignaturePackaging
Get Signature packaging- Returns:
- the expected signature packaging
-
setSignaturePackaging
Set Signature packaging- Parameters:
signaturePackaging
- the expected signature packaging
-
getSignatureAlgorithm
Deprecated.since DSS 6.1. Please useSignatureAlgorithm.getAlgorithm(getEncryptionAlgorithm(), getDigestAlgorithm())
Gets the signature algorithm.- Returns:
- the signature algorithm
-
setSignatureAlgorithm
Deprecated.since DSS 6.1. Please use#setDigestAlgorithm
and#setEncryptionAlgorithm
methodsSets the signature algorithm- Parameters:
signatureAlgorithm
-SignatureAlgorithm
-
getDigestAlgorithm
-
setDigestAlgorithm
Set the digest algorithm- Parameters:
digestAlgorithm
- the digest algorithm to set
-
getEncryptionAlgorithm
Get the encryption algorithm- Returns:
- the encryption algorithm.
-
setEncryptionAlgorithm
This setter should be used only when dealing with web services (or when signing in three steps). Usually the encryption algorithm is automatically extrapolated from the private key.- Parameters:
encryptionAlgorithm
- the encryption algorithm to use
-
getMaskGenerationFunction
Deprecated.since DSS 6.1. Please use#getEncryptionAlgorithm
to differentiate between MGF1 (EncryptionAlgorithm.RSASSA_PSS) and none MGF (any other result)Get the mask generation function- Returns:
- the mask generation function.
-
setMaskGenerationFunction
Deprecated.since DSS 6.1. Please use#setEncryptionAlgorithm
method to specify mask generation function using EncryptionAlgorithm.RSA for none MGF, EncryptionAlgorithm.RSASSA_PSS for MGF1Sets the mask generation function of the signature algorithm, when applicable- Parameters:
maskGenerationFunction
-MaskGenerationFunction
-
getContentTimestamps
Gets a list of content timestamps- Returns:
- list of
TimestampDTO
s
-
setContentTimestamps
Sets a list of content timestamps to be added into the signature- Parameters:
contentTimestamps
- list of contentTimestampDTO
s to set
-
getContentTimestampParameters
Get the parameters for content timestamp (Baseline-B)- Returns:
- the parameters to produce a content timestamp
-
setContentTimestampParameters
Set the parameters to produce the content timestamp (Baseline-B)- Parameters:
contentTimestampParameters
- the parameters to produce the content timestamp
-
getSignatureTimestampParameters
Get the parameters for signature timestamp (Baseline-T)- Returns:
- the parameters to produce a signature timestamp
-
setSignatureTimestampParameters
Set the parameters to produce the signature timestamp (Baseline-T)- Parameters:
signatureTimestampParameters
- the parameters to produce the signature timestamp
-
getArchiveTimestampParameters
Get the parameters for achive timestamp (Baseline-LTA)- Returns:
- the parameters to produce an archive timestamp
-
setArchiveTimestampParameters
Set the parameters to produce the archive timestamp (Baseline-LTA)- Parameters:
archiveTimestampParameters
- the parameters to produce the archive timestamp
-
isSignWithExpiredCertificate
Deprecated.since DSS 6.1. SeeCertificateVerifier#setAlertOnExpiredCertificate
Indicates if it is possible to sign with an expired certificate. The default value is false.- Returns:
- true if signature with an expired certificate is allowed
-
setSignWithExpiredCertificate
Deprecated.since DSS 6.1. Please useCertificateVerifier#setAlertOnExpiredCertificate
method insteadAllows to change the default behavior regarding the use of an expired certificate.- Parameters:
signWithExpiredCertificate
- true if signature with an expired certificate is allowed
-
isGenerateTBSWithoutCertificate
public boolean isGenerateTBSWithoutCertificate()Indicates if it is possible to generate ToBeSigned data without the signing certificate. The default values is false.- Returns:
- true if signing certificate is not required when generating ToBeSigned data.
-
setGenerateTBSWithoutCertificate
public void setGenerateTBSWithoutCertificate(boolean generateTBSWithoutCertificate) Allows to change the default behaviour regarding the requirements of signing certificate to generate ToBeSigned data.- Parameters:
generateTBSWithoutCertificate
- true if it should be possible to generate ToBeSigned data without certificate.
-
getImageParameters
Get the image information to be included (PAdES).- Returns:
RemoteSignatureImageParameters
the image information to be included.
-
setImageParameters
Set the image information to be included (PAdES).- Parameters:
imageParameters
-RemoteSignatureImageParameters
the image information to be included.
-
getSignatureIdToCounterSign
-
setSignatureIdToCounterSign
-
toString
-
hashCode
-
equals
-