public class CertStore extends java.lang.Object
| Modifier | Constructor and Description |
|---|---|
protected |
CertStore(CertStoreSpi storeSpi,
java.security.Provider provider,
java.lang.String type,
CertStoreParameters params)
Create a new CertStore.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Collection<? extends Certificate> |
getCertificates(CertSelector selector)
Get a collection of certificates from this CertStore, optionally
filtered by the specified CertSelector.
|
CertStoreParameters |
getCertStoreParameters()
Get the parameters this instance was created with, if any.
|
java.util.Collection<? extends CRL> |
getCRLs(CRLSelector selector)
Get a collection of certificate revocation lists from this CertStore,
optionally filtered by the specified CRLSelector.
|
static java.lang.String |
getDefaultType()
Returns the default certificate store type.
|
static CertStore |
getInstance(java.lang.String type,
CertStoreParameters params)
Returns an instance of the given certificate store type from the first
installed provider.
|
static CertStore |
getInstance(java.lang.String type,
CertStoreParameters params,
java.security.Provider provider)
Returns an instance of the given certificate store type from a given
provider.
|
static CertStore |
getInstance(java.lang.String type,
CertStoreParameters params,
java.lang.String provider)
Returns an instance of the given certificate store type from a named
provider.
|
java.security.Provider |
getProvider()
Return the provider of this implementation.
|
java.lang.String |
getType()
Return the type of certificate store this instance represents.
|
protected CertStore(CertStoreSpi storeSpi, java.security.Provider provider, java.lang.String type, CertStoreParameters params)
storeSpi - The underlying implementation.provider - The provider of this implementation.type - The type of CertStore this class represents.params - The parameters used to initialize this instance, if any.public static final java.lang.String getDefaultType()
This value can be set at run-time via the security property "certstore.type"; if not specified than the default type will be "LDAP".
public static CertStore getInstance(java.lang.String type, CertStoreParameters params) throws java.security.InvalidAlgorithmParameterException, java.security.NoSuchAlgorithmException
type - The type of CertStore to create.params - The parameters to initialize this cert store with.java.security.InvalidAlgorithmParameterException - If the instance rejects the
specified parameters.java.security.NoSuchAlgorithmException - If no installed provider implements the
specified CertStore.java.lang.IllegalArgumentException - if type is
null or is an empty string.public static CertStore getInstance(java.lang.String type, CertStoreParameters params, java.lang.String provider) throws java.security.InvalidAlgorithmParameterException, java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException
type - The type of CertStore to create.params - The parameters to initialize this cert store with.provider - The name of the provider to use.java.security.InvalidAlgorithmParameterException - If the instance rejects the
specified parameters.java.security.NoSuchAlgorithmException - If the specified provider does not
implement the specified CertStore.java.security.NoSuchProviderException - If no provider named provider is
installed.java.lang.IllegalArgumentException - if either type or
provider is null, or if
type is an empty string.public static CertStore getInstance(java.lang.String type, CertStoreParameters params, java.security.Provider provider) throws java.security.InvalidAlgorithmParameterException, java.security.NoSuchAlgorithmException
type - The type of CertStore to create.params - The parameters to initialize this cert store with.provider - The provider to use.java.security.InvalidAlgorithmParameterException - If the instance rejects
the specified parameters.java.security.NoSuchAlgorithmException - If the specified provider does not
implement the specified CertStore.java.lang.IllegalArgumentException - if either type or
provider is null, or if
type is an empty string.public final java.lang.String getType()
public final java.security.Provider getProvider()
public final CertStoreParameters getCertStoreParameters()
public final java.util.Collection<? extends Certificate> getCertificates(CertSelector selector) throws CertStoreException
Implementations may not allow a null argument, even if no filtering is desired.
selector - The certificate selector.CertStoreException - If the certificates cannot be retrieved.public final java.util.Collection<? extends CRL> getCRLs(CRLSelector selector) throws CertStoreException
Implementations may not allow a null argument, even if no filtering is desired.
selector - The certificate selector.CertStoreException - If the CRLs cannot be retrieved.