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 theCMSstatic CMSGeneratorLoads the availableCMSGeneratorbased on the loaded module in the classpath.voidsetAttributeCertificates(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 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 ofAlgorithmIdentifiers
-
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 availableCMSGeneratorbased 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:
CMSGeneratorimplementation
-