public class JSSEX509KeyManagerFactory
extends javax.net.ssl.KeyManagerFactorySpi
JSSEX09KeyManagerFactory class implements the
abstract class, javax.net.ssl.KeyManagerFractorySpi.
An instance of this class should always be created using the
javax.net.ssl.KeyManagerFactory engine class. For
example:
java.security.Security.addProvider(new com.entrust.toolkit.x509.jsse.provider.EntrustJSSEProvider());
KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509");
or
KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509", "Entrust_JSSE");
or
KeyManagerFactory kmf =
KeyManagerFactory.getInstance("SunX509", new com.entrust.toolkit.x509.jsse.provider.EntrustJSSEProvider());
A newly created key manager factory should be initialized as follows:
KetStore ks = new KeyStore(...);
ks.load(..., ...);
kmf.init( ks, null );
where null is the password ignored in this case.
You can retrieve the key managers by calling the
getKeyManagers method:
KeyManager[] keyManagers = kmf.getKeyManagers();
For more information, see the Oracle JSSE Reference Guide for the KeyManagerFactory
Note, if a non-Entrust keystore is being used, then this class will delegate the requested operation to the first provider in the list which supports the requested service/algorithm.
KeyManagerFactory,
JSSEX509KeyManager| Constructor and Description |
|---|
JSSEX509KeyManagerFactory() |
| Modifier and Type | Method and Description |
|---|---|
protected javax.net.ssl.KeyManager[] |
engineGetKeyManagers() |
protected void |
engineInit(java.security.KeyStore ks,
char[] password) |
protected void |
engineInit(javax.net.ssl.ManagerFactoryParameters managerfactoryparameters) |
protected java.lang.String |
getAlgorithm()
PKI-19467
This is only called if a non-Entrust keystore was passed into the engineInit method.
|
protected void engineInit(java.security.KeyStore ks,
char[] password)
throws java.security.KeyStoreException,
java.security.NoSuchAlgorithmException,
java.security.UnrecoverableKeyException
engineInit in class javax.net.ssl.KeyManagerFactorySpijava.security.KeyStoreExceptionjava.security.NoSuchAlgorithmExceptionjava.security.UnrecoverableKeyExceptionprotected javax.net.ssl.KeyManager[] engineGetKeyManagers()
engineGetKeyManagers in class javax.net.ssl.KeyManagerFactorySpiprotected void engineInit(javax.net.ssl.ManagerFactoryParameters managerfactoryparameters)
throws java.security.InvalidAlgorithmParameterException
engineInit in class javax.net.ssl.KeyManagerFactorySpijava.security.InvalidAlgorithmParameterExceptionprotected java.lang.String getAlgorithm()