Class CMSSignerInfoGeneratorBuilder

java.lang.Object
eu.europa.esig.dss.cades.signature.CMSSignerInfoGeneratorBuilder

public class CMSSignerInfoGeneratorBuilder extends Object
This class is used to build an instance of org.bouncycastle.cms.SignerInfoGenerator
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    org.bouncycastle.cms.SignerInfoGenerator
    build(CAdESSignatureParameters parameters, org.bouncycastle.operator.ContentSigner contentSigner)
    Builds a SignerInfoGenerator with no original document provided
    org.bouncycastle.cms.SignerInfoGenerator
    build(eu.europa.esig.dss.model.DSSDocument toSignDocument, CAdESSignatureParameters parameters, org.bouncycastle.operator.ContentSigner contentSigner)
    Builds a SignerInfoGenerator for signing a toSignDocument
    protected org.bouncycastle.cms.SignerInfoGeneratorBuilder
    getSignerInfoGeneratorBuilder(CAdESSignatureParameters parameters, eu.europa.esig.dss.model.DSSDocument contentToSign)
    This method creates a builder of SignerInfoGenerator
    protected org.bouncycastle.cms.SignerInfoGeneratorBuilder
    getSignerInfoGeneratorBuilder(org.bouncycastle.operator.DigestCalculatorProvider digestCalculatorProvider, org.bouncycastle.asn1.cms.AttributeTable signedAttributes, org.bouncycastle.asn1.cms.AttributeTable unsignedAttributes)
    This method creates a builder of SignerInfoGenerator
    setIncludeUnsignedAttributes(boolean includeUnsignedAttributes)
    Sets whether the unsigned attributes should be included into the generated SignerInfoGenerator

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CMSSignerInfoGeneratorBuilder

      public CMSSignerInfoGeneratorBuilder()
      Default constructor
  • Method Details

    • setIncludeUnsignedAttributes

      public CMSSignerInfoGeneratorBuilder setIncludeUnsignedAttributes(boolean includeUnsignedAttributes)
      Sets whether the unsigned attributes should be included into the generated SignerInfoGenerator
      Parameters:
      includeUnsignedAttributes - whether the unsigned attributes should be included
      Returns:
      this
    • build

      public org.bouncycastle.cms.SignerInfoGenerator build(CAdESSignatureParameters parameters, org.bouncycastle.operator.ContentSigner contentSigner)
      Builds a SignerInfoGenerator with no original document provided
      Parameters:
      parameters - CAdESSignatureParameters
      contentSigner - ContentSigner
      Returns:
      SignerInfoGenerator
    • build

      public org.bouncycastle.cms.SignerInfoGenerator build(eu.europa.esig.dss.model.DSSDocument toSignDocument, CAdESSignatureParameters parameters, org.bouncycastle.operator.ContentSigner contentSigner)
      Builds a SignerInfoGenerator for signing a toSignDocument
      Parameters:
      toSignDocument - DSSDocument to be signed
      parameters - CAdESSignatureParameters
      contentSigner - ContentSigner
      Returns:
      SignerInfoGenerator
    • getSignerInfoGeneratorBuilder

      protected org.bouncycastle.cms.SignerInfoGeneratorBuilder getSignerInfoGeneratorBuilder(CAdESSignatureParameters parameters, eu.europa.esig.dss.model.DSSDocument contentToSign)
      This method creates a builder of SignerInfoGenerator
      Parameters:
      parameters - the parameters of the signature containing values for the attributes
      contentToSign - DSSDocument represents a content to be signed
      Returns:
      a SignerInfoGeneratorBuilder that generate the signed and unsigned attributes according to the CAdESLevelBaselineB
    • getSignerInfoGeneratorBuilder

      protected org.bouncycastle.cms.SignerInfoGeneratorBuilder getSignerInfoGeneratorBuilder(org.bouncycastle.operator.DigestCalculatorProvider digestCalculatorProvider, org.bouncycastle.asn1.cms.AttributeTable signedAttributes, org.bouncycastle.asn1.cms.AttributeTable unsignedAttributes)
      This method creates a builder of SignerInfoGenerator
      Parameters:
      digestCalculatorProvider - the digest calculator (can be pre-computed)
      signedAttributes - the signedAttributes
      unsignedAttributes - the unsignedAttributes
      Returns:
      a SignerInfoGeneratorBuilder that generate the signed and unsigned attributes according to the parameters