Package eu.europa.esig.dss.model
Class AbstractSerializableSignatureParameters<TP extends SerializableTimestampParameters>
java.lang.Object
eu.europa.esig.dss.model.AbstractSerializableSignatureParameters<TP>
- Type Parameters:
TP- implementation ofSerializableTimestampParameters
- All Implemented Interfaces:
SerializableSignatureParameters,Serializable
- Direct Known Subclasses:
AbstractSignatureParameters
public abstract class AbstractSerializableSignatureParameters<TP extends SerializableTimestampParameters>
extends Object
implements SerializableSignatureParameters
Parameters for a Signature creation/extension
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected TPThe object representing the parameters related to the archive timestamp (Baseline-LTA)protected TPThe object representing the parameters related to the content timestamp (Baseline-B)protected TPThe object representing the parameters related to the signature timestamp (Baseline-T) -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefault constructor instantiating object with default values -
Method Summary
Modifier and TypeMethodDescriptionbLevel()Get Baseline B parameters (signed properties)booleanGet the parameters for archive timestamp (Baseline-LTA)Get the parameters for content timestamp (Baseline-B)Get the digest algorithmGet the encryption algorithmDeprecated.Get the digest algorithm for ds:Reference or message-digest attributeGets the signature algorithm.Get signature level: XAdES_BASELINE_T, CAdES_BASELINE_LTA...Get Signature packagingGet the parameters for signature timestamp (Baseline-T)inthashCode()booleanIndicates whether a revocation check shall be performed before -LT level incorporation (i.e. on signing or T-level creation) for a signing certificate and a respectful certificate chain.booleanIndicates if it is possible to generate ToBeSigned data without the signing certificate.booleanDeprecated.booleanDeprecated.voidsetArchiveTimestampParameters(TP archiveTimestampParameters) Set the parameters to produce the archive timestamp (Baseline-LTA)voidsetBLevelParams(BLevelParameters bLevelParams) Set the Baseline B parameters (signed properties)voidsetCheckCertificateRevocation(boolean checkCertificateRevocation) Allows setting whether a revocation status for a signing certificate should be checked on signature creation or T-level extension.voidsetContentTimestampParameters(TP contentTimestampParameters) Set the parameters to produce the content timestamp (Baseline-B)voidsetDigestAlgorithm(DigestAlgorithm digestAlgorithm) Set the digest algorithmvoidsetEncryptionAlgorithm(EncryptionAlgorithm encryptionAlgorithm) This method sets encryption algorithm to be used on signature creation.voidsetGenerateTBSWithoutCertificate(boolean generateTBSWithoutCertificate) Allows to change the default behaviour regarding the requirements of signing certificate to generate ToBeSigned data.voidsetMaskGenerationFunction(MaskGenerationFunction maskGenerationFunction) Deprecated.since DSS 6.1.voidsetReferenceDigestAlgorithm(DigestAlgorithm referenceDigestAlgorithm) Sets the DigestAlgorithm to be used for reference digest calculationvoidsetSignatureLevel(SignatureLevel signatureLevel) Set signature level.voidsetSignaturePackaging(SignaturePackaging signaturePackaging) Set Signature packagingvoidsetSignatureTimestampParameters(TP signatureTimestampParameters) Set the parameters to produce the signature timestamp (Baseline-T)voidsetSignWithExpiredCertificate(boolean signWithExpiredCertificate) Deprecated.since DSS 6.1.voidsetSignWithNotYetValidCertificate(boolean signWithNotYetValidCertificate) Deprecated.since DSS 6.1.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface eu.europa.esig.dss.model.SerializableSignatureParameters
getSigningCertificate
-
Field Details
-
contentTimestampParameters
The object representing the parameters related to the content timestamp (Baseline-B) -
signatureTimestampParameters
The object representing the parameters related to the signature timestamp (Baseline-T) -
archiveTimestampParameters
The object representing the parameters related to the archive timestamp (Baseline-LTA)
-
-
Constructor Details
-
AbstractSerializableSignatureParameters
protected AbstractSerializableSignatureParameters()Default constructor instantiating object with default values
-
-
Method Details
-
isSignWithExpiredCertificate
Deprecated.Description copied from interface:SerializableSignatureParametersIndicates if it is possible to sign with an expired certificate. The default value is false.- Specified by:
isSignWithExpiredCertificatein interfaceSerializableSignatureParameters- Returns:
- true if signature with an expired certificate is allowed
-
setSignWithExpiredCertificate
Deprecated.since DSS 6.1. Please useCertificateVerifier.setSignatureAlertOnExpiredCertificatemethod insteadAllows to change the default behavior regarding the use of an expired certificate on signature creation or T-level extension. Default : false (forbid signing with an expired signing certificate)- Parameters:
signWithExpiredCertificate- true if signature with an expired certificate is allowed
-
isSignWithNotYetValidCertificate
Deprecated.Description copied from interface:SerializableSignatureParametersIndicates if it is possible to sign with a not yet valid certificate. The default value is false.- Specified by:
isSignWithNotYetValidCertificatein interfaceSerializableSignatureParameters- Returns:
- true if signature with a not yet valid certificate is allowed
-
setSignWithNotYetValidCertificate
Deprecated.since DSS 6.1. Please useCertificateVerifier.getSignatureAlertOnNotYetValidCertificatemethod insteadAllows to change the default behavior regarding the use of a not yet valid certificate on signature creation or T-level extension. Default : false (forbid signing with a not yet valid signing certificate)- Parameters:
signWithNotYetValidCertificate- true if signature with a not yet valid certificate is allowed
-
isCheckCertificateRevocation
public boolean isCheckCertificateRevocation()Description copied from interface:SerializableSignatureParametersIndicates whether a revocation check shall be performed before -LT level incorporation (i.e. on signing or T-level creation) for a signing certificate and a respectful certificate chain. When set to false, the revocation check is not performed. When set to true, a real-time revocation is being requested from external sources (shall be defined in CertificateVerifier) and processed according to alerts set within that CertificateVerifier.Default value : false (no revocation check is performed on signature creation or T-level extension)
- Specified by:
isCheckCertificateRevocationin interfaceSerializableSignatureParameters- Returns:
- if signature with a revoked certificate is allowed
-
setCheckCertificateRevocation
public void setCheckCertificateRevocation(boolean checkCertificateRevocation) Allows setting whether a revocation status for a signing certificate should be checked on signature creation or T-level extension.NOTE: in order to specify a behavior for this check, the relevant alerts should be specified within a
CertificateVerifierinstance, used in a service for signing/extensionDefault : false (do not perform revocation data check on signature creation/T-level extension)
- Parameters:
checkCertificateRevocation- indicated if a certificate revocation check shall be performed
-
isGenerateTBSWithoutCertificate
public boolean isGenerateTBSWithoutCertificate()Indicates if it is possible to generate ToBeSigned data without the signing certificate. The default values is false.- Specified by:
isGenerateTBSWithoutCertificatein interfaceSerializableSignatureParameters- 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. NOTE: when using this method, it is important to ensure the sameEncryptionAlgorithmis provided within#setEncryptionAlgorithmas the one used on a signature value creation- Parameters:
generateTBSWithoutCertificate- true if it should be possible to generate ToBeSigned data without certificate.
-
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
-
getSignaturePackaging
Get Signature packaging- Returns:
- the expected signature packaging
-
setSignaturePackaging
Set Signature packaging- Parameters:
signaturePackaging- the expected signature packaging
-
getDigestAlgorithm
Description copied from interface:SerializableSignatureParametersGet the digest algorithm- Specified by:
getDigestAlgorithmin interfaceSerializableSignatureParameters- Returns:
- the digest algorithm
-
setDigestAlgorithm
Set the digest algorithm- Parameters:
digestAlgorithm- the digest algorithm to set
-
setMaskGenerationFunction
Deprecated.since DSS 6.1. Please use#setEncryptionAlgorithmmethod with value EncryptionAlgorithm.RSASSA_PSS in order to set MGF1, or value EncryptionAlgorithm.RSA to reset mask generation functionSets the mask generation function if used with the given SignatureAlgorithm- Parameters:
maskGenerationFunction-MaskGenerationFunction
-
getMaskGenerationFunction
Deprecated.Description copied from interface:SerializableSignatureParametersReturns the mask generation function- Specified by:
getMaskGenerationFunctionin interfaceSerializableSignatureParameters- Returns:
MaskGenerationFunction
-
getEncryptionAlgorithm
Description copied from interface:SerializableSignatureParametersGet the encryption algorithm- Specified by:
getEncryptionAlgorithmin interfaceSerializableSignatureParameters- Returns:
- the encryption algorithm.
-
setEncryptionAlgorithm
This method sets encryption algorithm to be used on signature creation. The method is useful when a specific encryption algorithm is expected. The defined encryption algorithm shall be the one used to create the SignatureValue. Note: The encryption algorithm is automatically extracted from the certificate's key with#setSigningCertificatemethod.- Parameters:
encryptionAlgorithm- the encryption algorithm to use
-
getSignatureAlgorithm
Description copied from interface:SerializableSignatureParametersGets the signature algorithm.- Specified by:
getSignatureAlgorithmin interfaceSerializableSignatureParameters- Returns:
- the signature algorithm
-
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 DigestAlgorithm to be used for reference digest calculation- Parameters:
referenceDigestAlgorithm-DigestAlgorithm
-
bLevel
Get Baseline B parameters (signed properties)- Specified by:
bLevelin interfaceSerializableSignatureParameters- Returns:
- the Baseline B parameters
-
setBLevelParams
Set the Baseline B parameters (signed properties)- Parameters:
bLevelParams- the baseline B properties
-
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 archive 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
-
toString
-
hashCode
-
equals
-