Package eu.europa.esig.dss.cms
Class AbstractCMSGenerator
java.lang.Object
eu.europa.esig.dss.cms.AbstractCMSGenerator
- All Implemented Interfaces:
CMSGenerator
- Direct Known Subclasses:
CMSObjectGenerator,CMSStreamGenerator
Abstract implementation of the
CMSGenerator containing the set variable values-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.bouncycastle.util.Store<org.bouncycastle.cert.X509AttributeCertificateHolder> Collection of attribute certificatesprotected org.bouncycastle.util.Store<org.bouncycastle.cert.X509CertificateHolder> Collection of certificates to be encapsulated within SignedData.certificates fieldprotected org.bouncycastle.util.Store<org.bouncycastle.cert.X509CRLHolder> Collection of CRLs to be encapsulated within SignedData.crls fieldprotected Collection<org.bouncycastle.asn1.x509.AlgorithmIdentifier> Collection of digest algorithms to be includedprotected booleanWhether the signed document shall be encapsulated within the CMSprotected org.bouncycastle.util.Store<?> Collection of OCSP basic responsesprotected org.bouncycastle.util.Store<?> Collection of OCSP responsesprotected org.bouncycastle.cms.SignerInfoGeneratorNew signer to be generatedprotected org.bouncycastle.cms.SignerInformationStoreCollection of existing signers to be addedprotected DSSDocumentThe document to be signed -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsetAttributeCertificates(org.bouncycastle.util.Store<org.bouncycastle.cert.X509AttributeCertificateHolder> attributeCertificates) Adds attribute certificatesvoidsetCertificates(org.bouncycastle.util.Store<org.bouncycastle.cert.X509CertificateHolder> certificateStore) Adds certificates to be embedded within SignedData.certificates fieldvoidsetCRLs(org.bouncycastle.util.Store<org.bouncycastle.cert.X509CRLHolder> crls) Adds CRLsvoidsetDigestAlgorithmIDs(Collection<org.bouncycastle.asn1.x509.AlgorithmIdentifier> digestAlgorithmIDs) Adds a collection of digest algorithm IDsvoidsetEncapsulate(boolean encapsulate) Sets whether the document shall be encapsulated within CMSvoidsetOcspBasicStore(org.bouncycastle.util.Store<?> ocspBasicStore) Adds a collection of OCSP basic responsesvoidsetOcspResponsesStore(org.bouncycastle.util.Store<?> ocspResponsesStore) Adds a collection of OCSP responsesvoidsetSignerInfoGenerator(org.bouncycastle.cms.SignerInfoGenerator signerInfoGenerator) Adds a SignerInfoGenerator containing information about a new signer to be embedded within CMSvoidsetSigners(org.bouncycastle.cms.SignerInformationStore signers) Adds existing SignerInformation'svoidsetToBeSignedDocument(DSSDocument toBeSignedDocument) Adds a document to be signedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface eu.europa.esig.dss.cms.CMSGenerator
generate
-
Field Details
-
signerInfoGenerator
protected org.bouncycastle.cms.SignerInfoGenerator signerInfoGeneratorNew signer to be generated -
certificateStore
protected org.bouncycastle.util.Store<org.bouncycastle.cert.X509CertificateHolder> certificateStoreCollection of certificates to be encapsulated within SignedData.certificates field -
signers
protected org.bouncycastle.cms.SignerInformationStore signersCollection of existing signers to be added -
attributeCertificates
protected org.bouncycastle.util.Store<org.bouncycastle.cert.X509AttributeCertificateHolder> attributeCertificatesCollection of attribute certificates -
crls
protected org.bouncycastle.util.Store<org.bouncycastle.cert.X509CRLHolder> crlsCollection of CRLs to be encapsulated within SignedData.crls field -
ocspBasicStore
protected org.bouncycastle.util.Store<?> ocspBasicStoreCollection of OCSP basic responses -
ocspResponsesStore
protected org.bouncycastle.util.Store<?> ocspResponsesStoreCollection of OCSP responses -
digestAlgorithmIDs
Collection of digest algorithms to be included -
toBeSignedDocument
The document to be signed -
encapsulate
protected boolean encapsulateWhether the signed document shall be encapsulated within the CMS
-
-
Constructor Details
-
AbstractCMSGenerator
protected AbstractCMSGenerator()Default constructor
-
-
Method Details
-
setSignerInfoGenerator
public void setSignerInfoGenerator(org.bouncycastle.cms.SignerInfoGenerator signerInfoGenerator) Description copied from interface:CMSGeneratorAdds a SignerInfoGenerator containing information about a new signer to be embedded within CMS- Specified by:
setSignerInfoGeneratorin interfaceCMSGenerator- Parameters:
signerInfoGenerator-SignerInfoGenerator
-
setCertificates
public void setCertificates(org.bouncycastle.util.Store<org.bouncycastle.cert.X509CertificateHolder> certificateStore) Description copied from interface:CMSGeneratorAdds certificates to be embedded within SignedData.certificates field- Specified by:
setCertificatesin interfaceCMSGenerator- Parameters:
certificateStore-Store
-
setSigners
public void setSigners(org.bouncycastle.cms.SignerInformationStore signers) Description copied from interface:CMSGeneratorAdds existing SignerInformation's- Specified by:
setSignersin interfaceCMSGenerator- Parameters:
signers-SignerInformationStore
-
setAttributeCertificates
public void setAttributeCertificates(org.bouncycastle.util.Store<org.bouncycastle.cert.X509AttributeCertificateHolder> attributeCertificates) Description copied from interface:CMSGeneratorAdds attribute certificates- Specified by:
setAttributeCertificatesin interfaceCMSGenerator- Parameters:
attributeCertificates-Store
-
setCRLs
public void setCRLs(org.bouncycastle.util.Store<org.bouncycastle.cert.X509CRLHolder> crls) Description copied from interface:CMSGeneratorAdds CRLs- Specified by:
setCRLsin interfaceCMSGenerator- Parameters:
crls-Store
-
setOcspBasicStore
public void setOcspBasicStore(org.bouncycastle.util.Store<?> ocspBasicStore) Description copied from interface:CMSGeneratorAdds a collection of OCSP basic responses- Specified by:
setOcspBasicStorein interfaceCMSGenerator- Parameters:
ocspBasicStore-Store
-
setOcspResponsesStore
public void setOcspResponsesStore(org.bouncycastle.util.Store<?> ocspResponsesStore) Description copied from interface:CMSGeneratorAdds a collection of OCSP responses- Specified by:
setOcspResponsesStorein interfaceCMSGenerator- Parameters:
ocspResponsesStore-Store
-
setDigestAlgorithmIDs
public void setDigestAlgorithmIDs(Collection<org.bouncycastle.asn1.x509.AlgorithmIdentifier> digestAlgorithmIDs) Description copied from interface:CMSGeneratorAdds a collection of digest algorithm IDs- Specified by:
setDigestAlgorithmIDsin interfaceCMSGenerator- Parameters:
digestAlgorithmIDs- a collection ofAlgorithmIdentifiers
-
setToBeSignedDocument
Description copied from interface:CMSGeneratorAdds a document to be signed- Specified by:
setToBeSignedDocumentin interfaceCMSGenerator- Parameters:
toBeSignedDocument-DSSDocument
-
setEncapsulate
public void setEncapsulate(boolean encapsulate) Description copied from interface:CMSGeneratorSets whether the document shall be encapsulated within CMS- Specified by:
setEncapsulatein interfaceCMSGenerator- Parameters:
encapsulate- whether encapsulate the signed data
-