Class AbstractSignatureParameters<TP extends eu.europa.esig.dss.model.SerializableTimestampParameters>
java.lang.Object
eu.europa.esig.dss.signature.AbstractSignatureParameters<TP>
- Type Parameters:
TP- implementation of certain format signature parameters
- All Implemented Interfaces:
Serializable
public abstract class AbstractSignatureParameters<TP extends eu.europa.esig.dss.model.SerializableTimestampParameters>
extends Object
Parameters for a Signature creation/extension
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected TPprotected TPprotected ProfileParametersThe internal signature processing variableprotected TP -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefault constructor instantiating object with null values -
Method Summary
Modifier and TypeMethodDescriptioneu.europa.esig.dss.model.BLevelParametersbLevel()booleanList<eu.europa.esig.dss.model.x509.CertificateToken> Set the certificate chainList<eu.europa.esig.dss.spi.x509.tsp.TimestampToken> Returns the list of theTimestampTokento be incorporated within the signature and representing the content-timestamp.Gets the signature creation context (internal variable)List<eu.europa.esig.dss.model.DSSDocument> This method returns the documents to sign.The deterministic identifier used for unique identification of a created signature (used in XAdES and PAdES).eu.europa.esig.dss.enumerations.DigestAlgorithmeu.europa.esig.dss.enumerations.EncryptionAlgorithmeu.europa.esig.dss.enumerations.DigestAlgorithmeu.europa.esig.dss.enumerations.SignatureAlgorithmeu.europa.esig.dss.enumerations.SignatureLeveleu.europa.esig.dss.enumerations.SignaturePackagingbyte[]Get signed dataeu.europa.esig.dss.model.x509.CertificateTokenGet the signing certificateeu.europa.esig.dss.enumerations.ValidationDataEncapsulationStrategyinthashCode()booleanbooleanvoidreinit()This method re-inits signature parameters to clean temporary settingsvoidvoidsetBLevelParams(eu.europa.esig.dss.model.BLevelParameters arg0) voidsetCertificateChain(eu.europa.esig.dss.model.x509.CertificateToken... certificateChainArray) This method sets the list of certificates which constitute the chain.voidsetCertificateChain(List<eu.europa.esig.dss.model.x509.CertificateToken> certificateChain) Set the certificate chainvoidsetCheckCertificateRevocation(boolean arg0) voidvoidsetContentTimestamps(List<eu.europa.esig.dss.spi.x509.tsp.TimestampToken> contentTimestamps) Sets a list of content timestamps to be included into the signaturevoidsetDetachedContents(List<eu.europa.esig.dss.model.DSSDocument> detachedContents) When signing this method is internally invoked by theAbstractSignatureServiceand the related variabledetachedContentis overwritten by the service parameter.voidsetDigestAlgorithm(eu.europa.esig.dss.enumerations.DigestAlgorithm arg0) voidsetEncryptionAlgorithm(eu.europa.esig.dss.enumerations.EncryptionAlgorithm arg0) voidsetGenerateTBSWithoutCertificate(boolean arg0) voidsetReferenceDigestAlgorithm(eu.europa.esig.dss.enumerations.DigestAlgorithm arg0) voidsetSignatureLevel(eu.europa.esig.dss.enumerations.SignatureLevel arg0) voidsetSignaturePackaging(eu.europa.esig.dss.enumerations.SignaturePackaging arg0) voidvoidsetSignedData(byte[] signedData) Set signed datavoidsetSigningCertificate(eu.europa.esig.dss.model.x509.CertificateToken signingCertificate) Set the signing certificate.voidsetValidationDataEncapsulationStrategy(eu.europa.esig.dss.enumerations.ValidationDataEncapsulationStrategy arg0) toString()
-
Field Details
-
context
The internal signature processing variable -
contentTimestampParameters
protected TP extends eu.europa.esig.dss.model.SerializableTimestampParameters contentTimestampParameters -
signatureTimestampParameters
protected TP extends eu.europa.esig.dss.model.SerializableTimestampParameters signatureTimestampParameters -
archiveTimestampParameters
protected TP extends eu.europa.esig.dss.model.SerializableTimestampParameters archiveTimestampParameters
-
-
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
public void setContentTimestamps(List<eu.europa.esig.dss.spi.x509.tsp.TimestampToken> contentTimestamps) 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
public eu.europa.esig.dss.model.x509.CertificateToken getSigningCertificate()Get the signing certificate- Returns:
- the signing certificate
-
setSigningCertificate
public void setSigningCertificate(eu.europa.esig.dss.model.x509.CertificateToken signingCertificate) 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
public void setCertificateChain(List<eu.europa.esig.dss.model.x509.CertificateToken> certificateChain) Set the certificate chain- Parameters:
certificateChain- theListofCertificateTokens
-
setCertificateChain
public void setCertificateChain(eu.europa.esig.dss.model.x509.CertificateToken... certificateChainArray) 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 -
toString
-
equals
-
hashCode
public int hashCode() -
isCheckCertificateRevocation
public boolean isCheckCertificateRevocation() -
setCheckCertificateRevocation
public void setCheckCertificateRevocation(boolean arg0) -
isGenerateTBSWithoutCertificate
public boolean isGenerateTBSWithoutCertificate() -
setGenerateTBSWithoutCertificate
public void setGenerateTBSWithoutCertificate(boolean arg0) -
getSignatureLevel
public eu.europa.esig.dss.enumerations.SignatureLevel getSignatureLevel() -
setSignatureLevel
public void setSignatureLevel(eu.europa.esig.dss.enumerations.SignatureLevel arg0) -
getSignaturePackaging
public eu.europa.esig.dss.enumerations.SignaturePackaging getSignaturePackaging() -
setSignaturePackaging
public void setSignaturePackaging(eu.europa.esig.dss.enumerations.SignaturePackaging arg0) -
getDigestAlgorithm
public eu.europa.esig.dss.enumerations.DigestAlgorithm getDigestAlgorithm() -
setDigestAlgorithm
public void setDigestAlgorithm(eu.europa.esig.dss.enumerations.DigestAlgorithm arg0) -
getEncryptionAlgorithm
public eu.europa.esig.dss.enumerations.EncryptionAlgorithm getEncryptionAlgorithm() -
setEncryptionAlgorithm
public void setEncryptionAlgorithm(eu.europa.esig.dss.enumerations.EncryptionAlgorithm arg0) -
getSignatureAlgorithm
public eu.europa.esig.dss.enumerations.SignatureAlgorithm getSignatureAlgorithm() -
getReferenceDigestAlgorithm
public eu.europa.esig.dss.enumerations.DigestAlgorithm getReferenceDigestAlgorithm() -
setReferenceDigestAlgorithm
public void setReferenceDigestAlgorithm(eu.europa.esig.dss.enumerations.DigestAlgorithm arg0) -
bLevel
public eu.europa.esig.dss.model.BLevelParameters bLevel() -
setBLevelParams
public void setBLevelParams(eu.europa.esig.dss.model.BLevelParameters arg0) -
getValidationDataEncapsulationStrategy
public eu.europa.esig.dss.enumerations.ValidationDataEncapsulationStrategy getValidationDataEncapsulationStrategy() -
setValidationDataEncapsulationStrategy
public void setValidationDataEncapsulationStrategy(eu.europa.esig.dss.enumerations.ValidationDataEncapsulationStrategy arg0) -
getContentTimestampParameters
-
setContentTimestampParameters
-
getSignatureTimestampParameters
-
setSignatureTimestampParameters
-
getArchiveTimestampParameters
-
setArchiveTimestampParameters
-