Class AbstractCMSGenerator

java.lang.Object
eu.europa.esig.dss.cms.AbstractCMSGenerator
All Implemented Interfaces:
CMSGenerator
Direct Known Subclasses:
CMSObjectGenerator, CMSStreamGenerator

public abstract class AbstractCMSGenerator extends Object implements CMSGenerator
Abstract implementation of the CMSGenerator containing the set variable values
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.bouncycastle.util.Store<org.bouncycastle.cert.X509AttributeCertificateHolder>
    Collection of attribute certificates
    protected org.bouncycastle.util.Store<org.bouncycastle.cert.X509CertificateHolder>
    Collection of certificates to be encapsulated within SignedData.certificates field
    protected org.bouncycastle.util.Store<org.bouncycastle.cert.X509CRLHolder>
    Collection of CRLs to be encapsulated within SignedData.crls field
    protected Collection<org.bouncycastle.asn1.x509.AlgorithmIdentifier>
    Collection of digest algorithms to be included
    protected boolean
    Whether the signed document shall be encapsulated within the CMS
    protected org.bouncycastle.util.Store<?>
    Collection of OCSP basic responses
    protected org.bouncycastle.util.Store<?>
    Collection of OCSP responses
    protected org.bouncycastle.cms.SignerInfoGenerator
    New signer to be generated
    protected org.bouncycastle.cms.SignerInformationStore
    Collection of existing signers to be added
    protected DSSDocument
    The document to be signed
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Default constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    setAttributeCertificates(org.bouncycastle.util.Store<org.bouncycastle.cert.X509AttributeCertificateHolder> attributeCertificates)
    Adds attribute certificates
    void
    setCertificates(org.bouncycastle.util.Store<org.bouncycastle.cert.X509CertificateHolder> certificateStore)
    Adds certificates to be embedded within SignedData.certificates field
    void
    setCRLs(org.bouncycastle.util.Store<org.bouncycastle.cert.X509CRLHolder> crls)
    Adds CRLs
    void
    setDigestAlgorithmIDs(Collection<org.bouncycastle.asn1.x509.AlgorithmIdentifier> digestAlgorithmIDs)
    Adds a collection of digest algorithm IDs
    void
    setEncapsulate(boolean encapsulate)
    Sets whether the document shall be encapsulated within CMS
    void
    setOcspBasicStore(org.bouncycastle.util.Store<?> ocspBasicStore)
    Adds a collection of OCSP basic responses
    void
    setOcspResponsesStore(org.bouncycastle.util.Store<?> ocspResponsesStore)
    Adds a collection of OCSP responses
    void
    setSignerInfoGenerator(org.bouncycastle.cms.SignerInfoGenerator signerInfoGenerator)
    Adds a SignerInfoGenerator containing information about a new signer to be embedded within CMS
    void
    setSigners(org.bouncycastle.cms.SignerInformationStore signers)
    Adds existing SignerInformation's
    void
    setToBeSignedDocument(DSSDocument toBeSignedDocument)
    Adds a document to be signed

    Methods 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 signerInfoGenerator
      New signer to be generated
    • certificateStore

      protected org.bouncycastle.util.Store<org.bouncycastle.cert.X509CertificateHolder> certificateStore
      Collection of certificates to be encapsulated within SignedData.certificates field
    • signers

      protected org.bouncycastle.cms.SignerInformationStore signers
      Collection of existing signers to be added
    • attributeCertificates

      protected org.bouncycastle.util.Store<org.bouncycastle.cert.X509AttributeCertificateHolder> attributeCertificates
      Collection of attribute certificates
    • crls

      protected org.bouncycastle.util.Store<org.bouncycastle.cert.X509CRLHolder> crls
      Collection of CRLs to be encapsulated within SignedData.crls field
    • ocspBasicStore

      protected org.bouncycastle.util.Store<?> ocspBasicStore
      Collection of OCSP basic responses
    • ocspResponsesStore

      protected org.bouncycastle.util.Store<?> ocspResponsesStore
      Collection of OCSP responses
    • digestAlgorithmIDs

      protected Collection<org.bouncycastle.asn1.x509.AlgorithmIdentifier> digestAlgorithmIDs
      Collection of digest algorithms to be included
    • toBeSignedDocument

      protected DSSDocument toBeSignedDocument
      The document to be signed
    • encapsulate

      protected boolean encapsulate
      Whether 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 interface CMSGenerator
      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 interface CMSGenerator
      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 interface CMSGenerator
      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 interface CMSGenerator
      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 interface CMSGenerator
      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 interface CMSGenerator
      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 interface CMSGenerator
      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 interface CMSGenerator
      Parameters:
      digestAlgorithmIDs - a collection of AlgorithmIdentifiers
    • setToBeSignedDocument

      public void setToBeSignedDocument(DSSDocument toBeSignedDocument)
      Description copied from interface: CMSGenerator
      Adds a document to be signed
      Specified by:
      setToBeSignedDocument in interface CMSGenerator
      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 interface CMSGenerator
      Parameters:
      encapsulate - whether encapsulate the signed data