javax.net.ssl
Class KeyManagerFactory
java.lang.Object
javax.net.ssl.KeyManagerFactory
public class KeyManagerFactory
extends java.lang.Object
A class that creates key manager implementations based on a
requested algorithm.
- Casey Marshall (rsdio@metastatic.org)
String | getAlgorithm() - Returns the name of this key manager factory algorithm.
|
static String | getDefaultAlgorithm() - Get the default algorithm name.
|
static KeyManagerFactory | getInstance(String algorithm) - Get an instance of the named key manager factory, from the first
provider that implements it.
|
static KeyManagerFactory | getInstance(String algorithm, Provider provider) - Get an instance of the named key manager factory, from the given
provider.
|
static KeyManagerFactory | getInstance(String algorithm, String provider) - Get an instance of the named key manager factory, from the named
provider.
|
KeyManager[] | getKeyManagers() - Get an array of key managers appropriate for this algorithm, with
the most preferred manager first.
|
Provider | getProvider() - Returns the provider of this implementation.
|
void | init(KeyStore store, char[] passwd) - Initialize this instance with a key store and a password for
private key entries.
|
void | init(ManagerFactoryParameters params) - Initialize this instance with an implementation-dependent
parameter object.
|
KeyManagerFactory
protected KeyManagerFactory(KeyManagerFactorySpi kmfSpi,
Provider provider,
String algorithm)
Create a new key manager factory.
kmfSpi
- The underlying engine.provider
- The engine's provider.algorithm
- The name of this algorithm.
getAlgorithm
public final String getAlgorithm()
Returns the name of this key manager factory algorithm.
- The name of this key manager factory algorithm.
getDefaultAlgorithm
public static final String getDefaultAlgorithm()
Get the default algorithm name. This value may be specified at
run-time via the security property
"ssl.KeyManagerFactory.algorithm". If this property is
not specified, this method returns "JessieX509".
- The default key manager factory algorithm's name.
getInstance
public static final KeyManagerFactory getInstance(String algorithm)
throws NoSuchAlgorithmException
Get an instance of the named key manager factory, from the first
provider that implements it.
algorithm
- The type of key manager factory to get.
- An appropriate implementation of that algoritm.
getInstance
public static final KeyManagerFactory getInstance(String algorithm,
Provider provider)
throws NoSuchAlgorithmException
Get an instance of the named key manager factory, from the given
provider.
algorithm
- The type of key manager factory to get.provider
- The provider to get the implementation from.
- An appropriate implementation of that algorithm.
getInstance
public static final KeyManagerFactory getInstance(String algorithm,
String provider)
throws NoSuchAlgorithmException,
NoSuchProviderException
Get an instance of the named key manager factory, from the named
provider.
algorithm
- The type of key manager factory to get.provider
- The name of the provider to get the
implementation from.
- An appropriate implementation of that algorithm.
getKeyManagers
public final KeyManager[] getKeyManagers()
Get an array of key managers appropriate for this algorithm, with
the most preferred manager first.
- The array of key managers.
getProvider
public final Provider getProvider()
Returns the provider of this implementation.
- The provider of this implementation.
init
public final void init(KeyStore store,
char[] passwd)
throws KeyStoreException,
NoSuchAlgorithmException,
UnrecoverableKeyException
Initialize this instance with a key store and a password for
private key entries.
store
- The key store to read.passwd
- The password protecting private keys in the store.
init
public final void init(ManagerFactoryParameters params)
throws InvalidAlgorithmParameterException
Initialize this instance with an implementation-dependent
parameter object.
params
- The parameters to initialize with.