Package org.bouncycastle.cert.jcajce
Class JcaCertStoreBuilder
- java.lang.Object
-
- org.bouncycastle.cert.jcajce.JcaCertStoreBuilder
-
public class JcaCertStoreBuilder extends java.lang.Object
Builder to create a CertStore from certificate and CRL stores.
-
-
Constructor Summary
Constructors Constructor Description JcaCertStoreBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JcaCertStoreBuilder
addCertificate(X509CertificateHolder cert)
Add a single certificate.JcaCertStoreBuilder
addCertificates(org.bouncycastle.util.Store certStore)
Add a store full of X509CertificateHolder objects.JcaCertStoreBuilder
addCRL(X509CRLHolder crl)
Add a single CRL.JcaCertStoreBuilder
addCRLs(org.bouncycastle.util.Store crlStore)
Add a store full of X509CRLHolder objects.java.security.cert.CertStore
build()
Build the CertStore from the current inputs.JcaCertStoreBuilder
setProvider(java.lang.String providerName)
JcaCertStoreBuilder
setProvider(java.security.Provider provider)
JcaCertStoreBuilder
setType(java.lang.String type)
Set the type of the CertStore generated.
-
-
-
Method Detail
-
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(java.lang.String providerName)
-
setProvider
public JcaCertStoreBuilder setProvider(java.security.Provider provider)
-
setType
public JcaCertStoreBuilder setType(java.lang.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 java.security.cert.CertStore build() throws java.security.GeneralSecurityException
Build the CertStore from the current inputs.- Returns:
- a CertStore.
- Throws:
java.security.GeneralSecurityException
-
-