Package eu.europa.esig.dss.signature
Class AbstractSignatureParameters<TP extends SerializableTimestampParameters>
java.lang.Object
eu.europa.esig.dss.model.AbstractSerializableSignatureParameters<TP>
eu.europa.esig.dss.signature.AbstractSignatureParameters<TP>
- Type Parameters:
TP- implementation of certain format signature parameters
- All Implemented Interfaces:
SerializableSignatureParameters,Serializable
- Direct Known Subclasses:
CAdESSignatureParameters,JAdESSignatureParameters,XAdESSignatureParameters
public abstract class AbstractSignatureParameters<TP extends SerializableTimestampParameters>
extends AbstractSerializableSignatureParameters<TP>
Parameters for a Signature creation/extension
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ProfileParametersThe internal signature processing variableFields inherited from class eu.europa.esig.dss.model.AbstractSerializableSignatureParameters
archiveTimestampParameters, contentTimestampParameters, signatureTimestampParameters -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefault constructor instantiating object with null values -
Method Summary
Modifier and TypeMethodDescriptionSet the certificate chainReturns the list of theTimestampTokento be incorporated within the signature and representing the content-timestamp.Gets the signature creation context (internal variable)This method returns the documents to sign.The deterministic identifier used for unique identification of a created signature (used in XAdES and PAdES).byte[]Get signed dataGet the signing certificatevoidreinit()This method re-inits signature parameters to clean temporary settingsvoidsetCertificateChain(CertificateToken... certificateChainArray) This method sets the list of certificates which constitute the chain.voidsetCertificateChain(List<CertificateToken> certificateChain) Set the certificate chainvoidsetContentTimestamps(List<TimestampToken> contentTimestamps) Sets a list of content timestamps to be included into the signaturevoidsetDetachedContents(List<DSSDocument> detachedContents) When signing this method is internally invoked by theAbstractSignatureServiceand the related variabledetachedContentis overwritten by the service parameter.voidsetSignedData(byte[] signedData) Set signed datavoidsetSigningCertificate(CertificateToken signingCertificate) Set the signing certificate.Methods inherited from class eu.europa.esig.dss.model.AbstractSerializableSignatureParameters
bLevel, equals, getArchiveTimestampParameters, getContentTimestampParameters, getDigestAlgorithm, getEncryptionAlgorithm, getMaskGenerationFunction, getReferenceDigestAlgorithm, getSignatureAlgorithm, getSignatureLevel, getSignaturePackaging, getSignatureTimestampParameters, hashCode, isCheckCertificateRevocation, isGenerateTBSWithoutCertificate, isSignWithExpiredCertificate, isSignWithNotYetValidCertificate, setArchiveTimestampParameters, setBLevelParams, setCheckCertificateRevocation, setContentTimestampParameters, setDigestAlgorithm, setEncryptionAlgorithm, setGenerateTBSWithoutCertificate, setMaskGenerationFunction, setReferenceDigestAlgorithm, setSignatureLevel, setSignaturePackaging, setSignatureTimestampParameters, setSignWithExpiredCertificate, setSignWithNotYetValidCertificate, toString
-
Field Details
-
context
The internal signature processing variable
-
-
Constructor Details
-
AbstractSignatureParameters
protected AbstractSignatureParameters()Default constructor instantiating object with null values
-
-
Method Details
-
getContentTimestamps
Returns the list of theTimestampTokento be incorporated within the signature and representing the content-timestamp.- Returns:
ListofTimestampToken
-
setContentTimestamps
Sets a list of content timestamps to be included into the signature- Parameters:
contentTimestamps- a list ofTimestampTokens
-
getDetachedContents
This method returns the documents to sign. In the case of the DETACHED signature this is the detached document.- Returns:
- the list of detached documents
-
setDetachedContents
When signing this method is internally invoked by theAbstractSignatureServiceand the related variabledetachedContentis overwritten by the service parameter. In the case of the DETACHED signature this is the detached document. In the case of ASiC-S this is the document to be signed.When extending this method must be invoked to indicate the
detachedContent.- Parameters:
detachedContents- the list of detached documents
-
getSigningCertificate
Get the signing certificate- Returns:
- the signing certificate
-
setSigningCertificate
Set the signing certificate. The encryption algorithm is also set from the public key. Note: This method overwrites theencryptionAlgorithmvalue by extracting the encryption algorithm from the provided signing-certificate. In order to enforce a specific encryption algorithm (when supported by the key), please execute#setEncryptionAlgorithmmethod after this method.- Parameters:
signingCertificate- the signing certificate
-
getSignedData
public byte[] getSignedData()Get signed data- Returns:
- signed data binaries
-
setSignedData
public void setSignedData(byte[] signedData) Set signed data- Parameters:
signedData- data that was used when creating the signature value.
-
getCertificateChain
Set the certificate chain- Returns:
- the certificate chain
-
setCertificateChain
Set the certificate chain- Parameters:
certificateChain- theListofCertificateTokens
-
setCertificateChain
This method sets the list of certificates which constitute the chain. If the certificate is already present in the array then it is ignored.- Parameters:
certificateChainArray- the array containing all certificates composing the chain
-
getDeterministicId
The deterministic identifier used for unique identification of a created signature (used in XAdES and PAdES). The identifier shall be built in a deterministic way to ensure the same value on both method calls during the signature creation.- Returns:
- the unique ID for the current signature or a document
-
getContext
Gets the signature creation context (internal variable)- Returns:
ProfileParameters
-
reinit
public void reinit()This method re-inits signature parameters to clean temporary settings
-