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.
Author:- Casey Marshall (rsdio@metastatic.org)
KeyManagerFactory
protected KeyManagerFactory(javax.net.ssl.KeyManagerFactorySpi kmfSpi, Provider provider, String algorithm)
Create a new key manager factory.
Parameters:
getAlgorithm
public final String getAlgorithm()
Returns the name of this key manager factory algorithm.
Returns:
- 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".
Returns:
- The default key manager factory algorithm's name.
getInstance
public static final KeyManagerFactory getInstance(String algorithm)
Get an instance of the named key manager factory, from the first
provider that implements it.
Parameters:
Returns:
- An appropriate implementation of that algoritm.
Throws:
- If no provider implements the
requested algorithm.
getInstance
public static final KeyManagerFactory getInstance(String algorithm, Provider provider)
Get an instance of the named key manager factory, from the given
provider.
Parameters:
Returns:
- An appropriate implementation of that algorithm.
Throws:
- If the provider does not
implement the requested algorithm.
- If provider is null.
getInstance
public static final KeyManagerFactory getInstance(String algorithm, String provider)
Get an instance of the named key manager factory, from the named
provider.
Parameters:
Returns:
- An appropriate implementation of that algorithm.
Throws:
- If the provider does not
implement the requested algorithm.
- If the named provider does not
exist.
getKeyManagers
public final KeyManager[] getKeyManagers()
Get an array of key managers appropriate for this algorithm, with
the most preferred manager first.
Returns:
- The array of key managers.
getProvider
public final Provider getProvider()
Returns the provider of this implementation.
Returns:
- The provider of this implementation.
init
public final void init(KeyStore store, char[] passwd)
Initialize this instance with a key store and a password for
private key entries.
Parameters:
Throws:
- If an error occurs reading the keys.
- If an algorithm (such as a
certificate algorithm) is not available.
- If the password is incorrect.
init
public final void init(javax.net.ssl.ManagerFactoryParameters params)
Initialize this instance with an implementation-dependent
parameter object.
Parameters:
Throws:
- If the specified
parameters are inappropriate.