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 boolean
Whether 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.SignerInfoGenerator
New signer to be generatedprotected org.bouncycastle.cms.SignerInformationStore
Collection of existing signers to be addedprotected DSSDocument
The document to be signed -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
setAttributeCertificates
(org.bouncycastle.util.Store<org.bouncycastle.cert.X509AttributeCertificateHolder> attributeCertificates) Adds attribute certificatesvoid
setCertificates
(org.bouncycastle.util.Store<org.bouncycastle.cert.X509CertificateHolder> certificateStore) Adds certificates to be embedded within SignedData.certificates fieldvoid
setCRLs
(org.bouncycastle.util.Store<org.bouncycastle.cert.X509CRLHolder> crls) Adds CRLsvoid
setDigestAlgorithmIDs
(Collection<org.bouncycastle.asn1.x509.AlgorithmIdentifier> digestAlgorithmIDs) Adds a collection of digest algorithm IDsvoid
setEncapsulate
(boolean encapsulate) Sets whether the document shall be encapsulated within CMSvoid
setOcspBasicStore
(org.bouncycastle.util.Store<?> ocspBasicStore) Adds a collection of OCSP basic responsesvoid
setOcspResponsesStore
(org.bouncycastle.util.Store<?> ocspResponsesStore) Adds a collection of OCSP responsesvoid
setSignerInfoGenerator
(org.bouncycastle.cms.SignerInfoGenerator signerInfoGenerator) Adds a SignerInfoGenerator containing information about a new signer to be embedded within CMSvoid
setSigners
(org.bouncycastle.cms.SignerInformationStore signers) Adds existing SignerInformation'svoid
setToBeSignedDocument
(DSSDocument toBeSignedDocument) Adds a document to be signedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:CMSGenerator
Adds a SignerInfoGenerator containing information about a new signer to be embedded within CMS- Specified by:
setSignerInfoGenerator
in interfaceCMSGenerator
- Parameters:
signerInfoGenerator
-SignerInfoGenerator
-
setCertificates
public void setCertificates(org.bouncycastle.util.Store<org.bouncycastle.cert.X509CertificateHolder> certificateStore) Description copied from interface:CMSGenerator
Adds certificates to be embedded within SignedData.certificates field- Specified by:
setCertificates
in interfaceCMSGenerator
- Parameters:
certificateStore
-Store
-
setSigners
public void setSigners(org.bouncycastle.cms.SignerInformationStore signers) Description copied from interface:CMSGenerator
Adds existing SignerInformation's- Specified by:
setSigners
in interfaceCMSGenerator
- Parameters:
signers
-SignerInformationStore
-
setAttributeCertificates
public void setAttributeCertificates(org.bouncycastle.util.Store<org.bouncycastle.cert.X509AttributeCertificateHolder> attributeCertificates) Description copied from interface:CMSGenerator
Adds attribute certificates- Specified by:
setAttributeCertificates
in interfaceCMSGenerator
- Parameters:
attributeCertificates
-Store
-
setCRLs
public void setCRLs(org.bouncycastle.util.Store<org.bouncycastle.cert.X509CRLHolder> crls) Description copied from interface:CMSGenerator
Adds CRLs- Specified by:
setCRLs
in interfaceCMSGenerator
- Parameters:
crls
-Store
-
setOcspBasicStore
public void setOcspBasicStore(org.bouncycastle.util.Store<?> ocspBasicStore) Description copied from interface:CMSGenerator
Adds a collection of OCSP basic responses- Specified by:
setOcspBasicStore
in interfaceCMSGenerator
- Parameters:
ocspBasicStore
-Store
-
setOcspResponsesStore
public void setOcspResponsesStore(org.bouncycastle.util.Store<?> ocspResponsesStore) Description copied from interface:CMSGenerator
Adds a collection of OCSP responses- Specified by:
setOcspResponsesStore
in interfaceCMSGenerator
- Parameters:
ocspResponsesStore
-Store
-
setDigestAlgorithmIDs
public void setDigestAlgorithmIDs(Collection<org.bouncycastle.asn1.x509.AlgorithmIdentifier> digestAlgorithmIDs) Description copied from interface:CMSGenerator
Adds a collection of digest algorithm IDs- Specified by:
setDigestAlgorithmIDs
in interfaceCMSGenerator
- Parameters:
digestAlgorithmIDs
- a collection ofAlgorithmIdentifier
s
-
setToBeSignedDocument
Description copied from interface:CMSGenerator
Adds a document to be signed- Specified by:
setToBeSignedDocument
in interfaceCMSGenerator
- Parameters:
toBeSignedDocument
-DSSDocument
-
setEncapsulate
public void setEncapsulate(boolean encapsulate) Description copied from interface:CMSGenerator
Sets whether the document shall be encapsulated within CMS- Specified by:
setEncapsulate
in interfaceCMSGenerator
- Parameters:
encapsulate
- whether encapsulate the signed data
-