Class CAdESLevelBaselineLTA
java.lang.Object
eu.europa.esig.dss.cades.signature.CAdESLevelBaselineT
eu.europa.esig.dss.cades.signature.CAdESLevelBaselineLT
eu.europa.esig.dss.cades.signature.CAdESLevelBaselineLTA
- All Implemented Interfaces:
SignatureExtension<CAdESSignatureParameters>
This class holds the CAdES-A signature profiles; it supports the later, over time _extension_ of a signature with
id-aa-ets-archiveTimestampV2 attributes as defined in ETSI TS 101 733 V1.8.1, clause 6.4.1.
"If the certificate-values and revocation-values attributes are not present in the CAdES-BES or CAdES-EPES, then they
shall be added to the electronic signature prior to computing the archive time-stamp token." is the reason we extend
from the XL profile.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final CertificateVerifierThe CertificateVerifier to useprotected DSSResourcesHandlerBuilderThis object is used to create data container objects such as an OutputStream or a DSSDocumentprotected final TSPSourceThe TSPSource to request a timestamp (T- and LTA-levels) -
Constructor Summary
ConstructorsConstructorDescriptionCAdESLevelBaselineLTA(TSPSource tspSource, CertificateVerifier certificateVerifier) The default constructor -
Method Summary
Modifier and TypeMethodDescriptionextendCMSSignatures(CMS cms, CAdESSignatureParameters parameters) Extends aCMSprotected CMSextendCMSSignatures(CMS cms, CAdESSignatureParameters parameters, List<String> signatureIdsToExtend) This method extends the signatures in thecmsSignedDatawith ids listed withinsignatureIdsToExtendprotected CMSextendCMSSignatures(CMS cms, Collection<org.bouncycastle.cms.SignerInformation> signerInformationsToExtend, CAdESSignatureParameters parameters) Loops on each signerInformation of thecmsSignedDataand extends ones defined in the collectionsignerInformationsToExtendextendCMSSignatures(CMS cms, org.bouncycastle.cms.SignerInformation signerInformation, CAdESSignatureParameters parameters) Extends aCMSwith a specifiedSignerInformationNOTE: does not modify otherSignerInformationsextendSignatures(DSSDocument signatureToExtend, CAdESSignatureParameters parameters) Extends CMS signatures provided within thesignatureToExtenddocumentprotected CMSDocumentAnalyzergetDocumentValidator(CMS cms, CAdESSignatureParameters parameters) This method returns a document validator for aCMSprotected org.bouncycastle.asn1.ASN1ObjectgetTimeStampAttributeValue(DSSMessageDigest timestampMessageDigest, DigestAlgorithm timestampDigestAlgorithm, org.bouncycastle.asn1.cms.Attribute... attributesForTimestampToken) Generates and returns a TimeStamp attribute valueprotected CMSreplaceSigners(CMS originalCMS, List<org.bouncycastle.cms.SignerInformation> newSignerInformationList) This method replaces the signers within the providedoriginalCMSvoidsetResourcesHandlerBuilder(DSSResourcesHandlerBuilder resourcesHandlerBuilder) This method sets aDSSResourcesHandlerBuilderto be used for operating with internal objects during the signature creation procedure.Methods inherited from class eu.europa.esig.dss.cades.signature.CAdESLevelBaselineLT
getExtendToLTLevelSignatures, includesATSv2Methods inherited from class eu.europa.esig.dss.cades.signature.CAdESLevelBaselineT
getSignatureRequirementsChecker
-
Field Details
-
tspSource
The TSPSource to request a timestamp (T- and LTA-levels) -
certificateVerifier
The CertificateVerifier to use -
resourcesHandlerBuilder
This object is used to create data container objects such as an OutputStream or a DSSDocument
-
-
Constructor Details
-
CAdESLevelBaselineLTA
The default constructor- Parameters:
tspSource-TSPSourceto request a timestampcertificateVerifier-CertificateVerifier
-
-
Method Details
-
extendCMSSignatures
protected CMS extendCMSSignatures(CMS cms, CAdESSignatureParameters parameters, List<String> signatureIdsToExtend) This method extends the signatures in thecmsSignedDatawith ids listed withinsignatureIdsToExtend- Overrides:
extendCMSSignaturesin classCAdESLevelBaselineLT- Parameters:
cms-CMScontaining the signatures to be extendedparameters-CAdESSignatureParameterssignatureIdsToExtend- a list ofStringsignature Ids to be extended- Returns:
CMS
-
setResourcesHandlerBuilder
This method sets aDSSResourcesHandlerBuilderto be used for operating with internal objects during the signature creation procedure.- Parameters:
resourcesHandlerBuilder-DSSResourcesHandlerBuilder
-
extendSignatures
public DSSDocument extendSignatures(DSSDocument signatureToExtend, CAdESSignatureParameters parameters) Extends CMS signatures provided within thesignatureToExtenddocument- Specified by:
extendSignaturesin interfaceSignatureExtension<CAdESSignatureParameters>- Parameters:
signatureToExtend-DSSDocumentto be extendedparameters-CAdESSignatureParametersof the extension- Returns:
DSSDocumenta new extended document
-
extendCMSSignatures
Extends aCMS- Parameters:
cms-CMSto extendparameters-CAdESSignatureParameters- Returns:
CMS
-
extendCMSSignatures
public CMS extendCMSSignatures(CMS cms, org.bouncycastle.cms.SignerInformation signerInformation, CAdESSignatureParameters parameters) Extends aCMSwith a specifiedSignerInformationNOTE: does not modify otherSignerInformations- Parameters:
cms-CMSto extendsignerInformation-SignerInformationto extendparameters-CAdESSignatureParameters- Returns:
CMS
-
extendCMSSignatures
protected CMS extendCMSSignatures(CMS cms, Collection<org.bouncycastle.cms.SignerInformation> signerInformationsToExtend, CAdESSignatureParameters parameters) Loops on each signerInformation of thecmsSignedDataand extends ones defined in the collectionsignerInformationsToExtend- Parameters:
cms-CMSsignerInformationsToExtend- a collection ofSignerInformationto be extendedparameters-CAdESSignatureParametersfor the extension- Returns:
CMSwith extended signerInformations
-
replaceSigners
protected CMS replaceSigners(CMS originalCMS, List<org.bouncycastle.cms.SignerInformation> newSignerInformationList) This method replaces the signers within the providedoriginalCMS -
getTimeStampAttributeValue
protected org.bouncycastle.asn1.ASN1Object getTimeStampAttributeValue(DSSMessageDigest timestampMessageDigest, DigestAlgorithm timestampDigestAlgorithm, org.bouncycastle.asn1.cms.Attribute... attributesForTimestampToken) Generates and returns a TimeStamp attribute value- Parameters:
timestampMessageDigest-DSSMessageDigestmessage-digest to be timestampedtimestampDigestAlgorithm-DigestAlgorithmto useattributesForTimestampToken-Attributes to add- Returns:
ASN1Objectrepresenting a TimeStamp token attribute value
-
getDocumentValidator
This method returns a document validator for aCMS- Parameters:
cms-CMSto get validation forparameters-CAdESSignatureParameters- Returns:
CMSDocumentAnalyzer
-