Top Description Fields Constructors Methods
org.bouncycastle.cert.jcajce

public Class JcaCertStoreBuilder

extends Object
Class Inheritance
Imports
java.security.GeneralSecurityException, .Provider, java.security.cert.CRLException, .CertStore, .CertificateException, .CollectionCertStoreParameters, java.util.ArrayList, .Iterator, .List, org.bouncycastle.cert.X509CRLHolder, .X509CertificateHolder, org.bouncycastle.util.Store

Builder to create a CertStore from certificate and CRL stores.

Field Summary

Modifier and TypeField and Description
private JcaX509CertificateConverter
private List<E>
private JcaX509CRLConverter
private List<E>
private Object
private String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public JcaCertStoreBuilder
addCertificate(X509CertificateHolder
the X509 certificate holder containing the certificate.
cert
)

Add a single certificate.

public JcaCertStoreBuilder
addCertificates(Store<T>
a store of X509CertificateHolder objects.
certStore
)

Add a store full of X509CertificateHolder objects.

public JcaCertStoreBuilder
addCRL(X509CRLHolder
the X509 CRL holder containing the CRL.
crl
)

Add a single CRL.

public JcaCertStoreBuilder
addCRLs(Store<T>
a store of X509CRLHolder objects.
crlStore
)

Add a store full of X509CRLHolder objects.

public CertStore

Returns:

a CertStore.
build
()

Build the CertStore from the current inputs.

private CollectionCertStoreParameters
public JcaCertStoreBuilder
setProvider(String providerName)

public JcaCertStoreBuilder
public JcaCertStoreBuilder

Returns:

the current builder.
setType
(String
type of CertStore passed to CertStore.getInstance().
type
)

Set the type of the CertStore generated.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

certificateConverterback to summary
private JcaX509CertificateConverter certificateConverter
certsback to summary
private List<E> certs
crlConverterback to summary
private JcaX509CRLConverter crlConverter
crlsback to summary
private List<E> crls
providerback to summary
private Object provider
typeback to summary
private String type

Constructor Detail

JcaCertStoreBuilderback to summary
public JcaCertStoreBuilder()

Method Detail

addCertificateback to summary
public JcaCertStoreBuilder addCertificate(X509CertificateHolder cert)

Add a single certificate.

Parameters
cert:X509CertificateHolder

the X509 certificate holder containing the certificate.

addCertificatesback to summary
public JcaCertStoreBuilder addCertificates(Store<T> certStore)

Add a store full of X509CertificateHolder objects.

Parameters
certStore:Store<T>

a store of X509CertificateHolder objects.

addCRLback to summary
public JcaCertStoreBuilder addCRL(X509CRLHolder crl)

Add a single CRL.

Parameters
crl:X509CRLHolder

the X509 CRL holder containing the CRL.

addCRLsback to summary
public JcaCertStoreBuilder addCRLs(Store<T> crlStore)

Add a store full of X509CRLHolder objects.

Parameters
crlStore:Store<T>

a store of X509CRLHolder objects.

buildback to summary
public CertStore build() throws GeneralSecurityException

Build the CertStore from the current inputs.

Returns:CertStore

a CertStore.

convertHoldersback to summary
private CollectionCertStoreParameters convertHolders(JcaX509CertificateConverter certificateConverter, JcaX509CRLConverter crlConverter) throws CertificateException, CRLException
setProviderback to summary
public JcaCertStoreBuilder setProvider(String providerName)
setProviderback to summary
public JcaCertStoreBuilder setProvider(Provider provider)
setTypeback to summary
public JcaCertStoreBuilder setType(String type)

Set the type of the CertStore generated. By default it is "Collection".

Parameters
type:String

type of CertStore passed to CertStore.getInstance().

Returns:JcaCertStoreBuilder

the current builder.