Class JcaCertStoreBuilder

java.lang.Object
org.bouncycastle.cert.jcajce.JcaCertStoreBuilder

public class JcaCertStoreBuilder extends Object
Builder to create a CertStore from certificate and CRL stores.
  • Constructor Details

    • JcaCertStoreBuilder

      public JcaCertStoreBuilder()
  • Method Details

    • addCertificates

      public JcaCertStoreBuilder addCertificates(org.bouncycastle.util.Store certStore)
      Add a store full of X509CertificateHolder objects.
      Parameters:
      certStore - a store of X509CertificateHolder objects.
    • addCertificate

      public JcaCertStoreBuilder addCertificate(X509CertificateHolder cert)
      Add a single certificate.
      Parameters:
      cert - the X509 certificate holder containing the certificate.
    • addCRLs

      public JcaCertStoreBuilder addCRLs(org.bouncycastle.util.Store crlStore)
      Add a store full of X509CRLHolder objects.
      Parameters:
      crlStore - a store of X509CRLHolder objects.
    • addCRL

      public JcaCertStoreBuilder addCRL(X509CRLHolder crl)
      Add a single CRL.
      Parameters:
      crl - the X509 CRL holder containing the CRL.
    • setProvider

      public JcaCertStoreBuilder setProvider(String providerName)
    • setProvider

      public JcaCertStoreBuilder setProvider(Provider provider)
    • setType

      public JcaCertStoreBuilder setType(String type)
      Set the type of the CertStore generated. By default it is "Collection".
      Parameters:
      type - type of CertStore passed to CertStore.getInstance().
      Returns:
      the current builder.
    • build

      public CertStore build() throws GeneralSecurityException
      Build the CertStore from the current inputs.
      Returns:
      a CertStore.
      Throws:
      GeneralSecurityException