Package eu.europa.esig.dss.cms
Interface CMSGenerator
- All Known Implementing Classes:
AbstractCMSGenerator
,CMSObjectGenerator
,CMSStreamGenerator
public interface CMSGenerator
Generates a
eu.europa.esig.dss.eu.europa.esig.dss.cms.CMS
with the given input data-
Method Summary
Modifier and TypeMethodDescriptiongenerate()
Generates theCMS
static CMSGenerator
Loads the availableCMSGenerator
based on the loaded module in the classpath.void
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 document) Adds a document to be signed
-
Method Details
-
setSignerInfoGenerator
void setSignerInfoGenerator(org.bouncycastle.cms.SignerInfoGenerator signerInfoGenerator) Adds a SignerInfoGenerator containing information about a new signer to be embedded within CMS- Parameters:
signerInfoGenerator
-SignerInfoGenerator
-
setCertificates
void setCertificates(org.bouncycastle.util.Store<org.bouncycastle.cert.X509CertificateHolder> certificateStore) Adds certificates to be embedded within SignedData.certificates field- Parameters:
certificateStore
-Store
-
setSigners
void setSigners(org.bouncycastle.cms.SignerInformationStore signers) Adds existing SignerInformation's- Parameters:
signers
-SignerInformationStore
-
setAttributeCertificates
void setAttributeCertificates(org.bouncycastle.util.Store<org.bouncycastle.cert.X509AttributeCertificateHolder> attributeCertificates) Adds attribute certificates- Parameters:
attributeCertificates
-Store
-
setCRLs
void setCRLs(org.bouncycastle.util.Store<org.bouncycastle.cert.X509CRLHolder> crls) Adds CRLs- Parameters:
crls
-Store
-
setOcspBasicStore
void setOcspBasicStore(org.bouncycastle.util.Store<?> ocspBasicStore) Adds a collection of OCSP basic responses- Parameters:
ocspBasicStore
-Store
-
setOcspResponsesStore
void setOcspResponsesStore(org.bouncycastle.util.Store<?> ocspResponsesStore) Adds a collection of OCSP responses- Parameters:
ocspResponsesStore
-Store
-
setDigestAlgorithmIDs
void setDigestAlgorithmIDs(Collection<org.bouncycastle.asn1.x509.AlgorithmIdentifier> digestAlgorithmIDs) Adds a collection of digest algorithm IDs- Parameters:
digestAlgorithmIDs
- a collection ofAlgorithmIdentifier
s
-
setToBeSignedDocument
Adds a document to be signed- Parameters:
document
-DSSDocument
-
setEncapsulate
void setEncapsulate(boolean encapsulate) Sets whether the document shall be encapsulated within CMS- Parameters:
encapsulate
- whether encapsulate the signed data
-
generate
CMS generate()Generates theCMS
- Returns:
CMS
-
loadCMSGenerator
Loads the availableCMSGenerator
based on the loaded module in the classpath. One of the 'dss-cms-object' or 'dss-cms-stream' shall be defined in the list of dependencies.- Returns:
CMSGenerator
implementation
-