Certificates and CRLs
from a repository.
This class uses a provider-based architecture.
To create a CertStore, call one of the static
getInstance methods, passing in the type of
CertStore desired, any applicable initialization parameters
and optionally the name of the provider desired.
Once the CertStore has been created, it can be used to
retrieve Certificates and CRLs by calling its
getCertificates and
getCRLs methods.
Unlike a KeyStore, which provides access
to a cache of private keys and trusted certificates, a
CertStore is designed to provide access to a potentially
vast repository of untrusted certificates and CRLs. For example, an LDAP
implementation of CertStore provides access to certificates
and CRLs stored in one or more directories using the LDAP protocol and the
schema as defined in the RFC service attribute.
Every implementation of the Java platform is required to support the
following standard CertStore type:
CollectionConcurrent Access
All public methods of CertStore objects must be thread-safe.
That is, multiple threads may concurrently invoke these methods on a
single CertStore object (or more than one) with no
ill effects. This allows a CertPathBuilder to search for a
CRL while simultaneously searching for further certificates, for instance.
The static methods of this class are also guaranteed to be thread-safe. Multiple threads may concurrently invoke the static methods defined in this class with no ill effects.
| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private CertStoreParameters | |
| private final Provider | |
| private final CertStoreSpi | |
| private final String |
| Access | Constructor and Description |
|---|---|
| protected | CertStore(CertStoreSpi
the provider implementation storeSpi, Provider the provider provider, String the type type, CertStoreParameters the initialization parameters (may be params)null)Creates a |
| Modifier and Type | Method and Description |
|---|---|
| public final Collection | Returns: ACollection of Certificates that
match the specified selector (never null)A selector)CertSelector used to select which
Certificates should be returned. Specify null
to return all Certificates (if supported).Returns a |
| public final CertStoreParameters | Returns: the parameters used to initialize thisCertStore
(may be null)Returns the parameters used to initialize this |
| public final Collection | Returns: ACollection of CRLs that
match the specified selector (never null)A selector)CRLSelector used to select which
CRLs should be returned. Specify null
to return all CRLs (if supported).Returns a |
| public static final String | Returns: the defaultCertStore type as specified by the
certstore.type security property, or the string
"LDAP" if no such property exists.Returns the default |
| public static CertStore | Returns: aCertStore object that implements the specified
CertStore typethe name of the requested type, CertStoreParameters CertStore type.
See the CertStore section in the
Java Security Standard Algorithm Names Specification
for information about standard types.the initialization parameters (may be params)null).Returns a |
| public static CertStore | Returns: aCertStore object that implements the
specified typethe requested type, CertStoreParameters CertStore type.
See the CertStore section in the
Java Security Standard Algorithm Names Specification
for information about standard types.the initialization parameters (may be params, String null).the name of the provider. provider)Returns a |
| public static CertStore | Returns: aCertStore object that implements the
specified typethe requested type, CertStoreParameters CertStore type.
See the CertStore section in the
Java Security Standard Algorithm Names Specification
for information about standard types.the initialization parameters (may be params, Provider null).the provider. provider)Returns a |
| public final Provider | |
| public final String | |
| private static CertStore |
| CERTSTORE_TYPE | back to summary |
|---|---|
| private static final String CERTSTORE_TYPE | |
| params | back to summary |
|---|---|
| private CertStoreParameters params | |
| provider | back to summary |
|---|---|
| private final Provider provider | |
| storeSpi | back to summary |
|---|---|
| private final CertStoreSpi storeSpi | |
| type | back to summary |
|---|---|
| private final String type | |
| CertStore | back to summary |
|---|---|
| protected CertStore(CertStoreSpi storeSpi, Provider provider, String type, CertStoreParameters params) Creates a
| |
| getCertificates | back to summary |
|---|---|
| public final Collection Returns a
For some
Some
| |
| getCertStoreParameters | back to summary |
|---|---|
| public final CertStoreParameters getCertStoreParameters() Returns the parameters used to initialize this
| |
| getCRLs | back to summary |
|---|---|
| public final Collection Returns a
For some
Some
| |
| getDefaultType | back to summary |
|---|---|
| public static final String getDefaultType() Returns the default The default The default
| |
| getInstance | back to summary |
|---|---|
| public static CertStore getInstance(String type, CertStoreParameters params) throws InvalidAlgorithmParameterException, NoSuchAlgorithmException Returns a This method traverses the list of registered security Providers, starting with the most preferred Provider. A new CertStore object encapsulating the CertStoreSpi implementation from the first Provider that supports the specified type is returned. Note that the list of registered providers may be retrieved via
the The Implementation Note The JDK Reference Implementation additionally uses the
| |
| getInstance | back to summary |
|---|---|
| public static CertStore getInstance(String type, CertStoreParameters params, String provider) throws InvalidAlgorithmParameterException, NoSuchAlgorithmException, NoSuchProviderException Returns a A new CertStore object encapsulating the CertStoreSpi implementation from the specified provider is returned. The specified provider must be registered in the security provider list. Note that the list of registered providers may be retrieved via
the The
| |
| getInstance | back to summary |
|---|---|
| public static CertStore getInstance(String type, CertStoreParameters params, Provider provider) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException Returns a A new CertStore object encapsulating the CertStoreSpi implementation from the specified Provider object is returned. Note that the specified Provider object does not have to be registered in the provider list. The
| |
| getProvider | back to summary |
|---|---|
| public final Provider getProvider() Returns the provider of this
| |
| getType | back to summary |
|---|---|
| public final String getType() Returns the type of this
| |
| handleException | back to summary |
|---|---|
| private static CertStore handleException(NoSuchAlgorithmException e) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException | |