|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Management interface for working with keystores. Mostly this is used to identify KeystoreInstances to work with individual keystores.
KeystoreInstance
Method Summary | |
KeystoreInstance |
createKeystore(String name,
char[] password)
Creates a new, empty keystore. |
SSLSocketFactory |
createSSLFactory(String provider,
String protocol,
String algorithm,
String trustStore,
ClassLoader loader)
Gets a SocketFactory using one Keystore to access the private key and another to provide the list of trusted certificate authorities. |
SSLSocketFactory |
createSSLFactory(String provider,
String protocol,
String algorithm,
String keyStore,
String keyAlias,
String trustStore,
ClassLoader loader)
Gets a SocketFactory using one Keystore to access the private key and another to provide the list of trusted certificate authorities. |
SSLServerSocketFactory |
createSSLServerFactory(String provider,
String protocol,
String algorithm,
String keyStore,
String keyAlias,
String trustStore,
ClassLoader loader)
Gets a ServerSocketFactory using one Keystore to access the private key and another to provide the list of trusted certificate authorities. |
KeystoreInstance[] |
getKeystores()
Gets the names of the keystores available in the server. |
KeystoreInstance[] |
getUnlockedKeyStores()
Gets the aliases for any keystores that are available to be used as private key keystores for an SSL factory. |
KeystoreInstance[] |
getUnlockedTrustStores()
Gets the aliases for any keystores that are available to be used as trusted certificate keystores for an SSL factory. |
Method Detail |
public KeystoreInstance[] getKeystores()
public SSLServerSocketFactory createSSLServerFactory(String provider, String protocol, String algorithm, String keyStore, String keyAlias, String trustStore, ClassLoader loader) throws KeystoreIsLocked, KeyIsLocked, NoSuchAlgorithmException, UnrecoverableKeyException, KeyStoreException, KeyManagementException, NoSuchProviderException
provider
- The SSL provider to use, or null for the defaultprotocol
- The SSL protocol to usealgorithm
- The SSL algorithm to usekeyStore
- The key keystore name as provided by listKeystores. The
KeystoreInstance for this keystore must be unlocked.keyAlias
- The name of the private key in the keystore. The
KeystoreInstance for this keystore must have unlocked
this key.trustStore
- The trust keystore name as provided by listKeystores.
The KeystoreInstance for this keystore must have
unlocked this key.loader
- The class loader used to resolve factory classes.
KeystoreIsLocked
- Occurs when the requested key keystore cannot
be used because it has not been unlocked.
KeyIsLocked
- Occurs when the requested private key in the key
keystore cannot be used because it has not been
unlocked.
NoSuchAlgorithmException
UnrecoverableKeyException
KeyStoreException
KeyManagementException
NoSuchProviderException
public SSLSocketFactory createSSLFactory(String provider, String protocol, String algorithm, String keyStore, String keyAlias, String trustStore, ClassLoader loader) throws KeystoreIsLocked, KeyIsLocked, NoSuchAlgorithmException, UnrecoverableKeyException, KeyStoreException, KeyManagementException, NoSuchProviderException
provider
- The SSL provider to use, or null for the defaultprotocol
- The SSL protocol to usealgorithm
- The SSL algorithm to usekeyStore
- The key keystore name as provided by listKeystores. The
KeystoreInstance for this keystore must be unlocked.keyAlias
- The name of the private key in the keystore. The
KeystoreInstance for this keystore must have unlocked
this key.trustStore
- The trust keystore name as provided by listKeystores.
The KeystoreInstance for this keystore must have
unlocked this key.loader
- The class loader used to resolve factory classes.
KeystoreIsLocked
- Occurs when the requested key keystore cannot
be used because it has not been unlocked.
KeyIsLocked
- Occurs when the requested private key in the key
keystore cannot be used because it has not been
unlocked.
NoSuchAlgorithmException
UnrecoverableKeyException
KeyStoreException
KeyManagementException
NoSuchProviderException
public SSLSocketFactory createSSLFactory(String provider, String protocol, String algorithm, String trustStore, ClassLoader loader) throws KeystoreIsLocked, KeyIsLocked, NoSuchAlgorithmException, UnrecoverableKeyException, KeyStoreException, KeyManagementException, NoSuchProviderException
provider
- The SSL provider to use, or null for the defaultprotocol
- The SSL protocol to usealgorithm
- The SSL algorithm to usetrustStore
- The trust keystore name as provided by listKeystores.
The KeystoreInstance for this keystore must have
unlocked this key.loader
- The class loader used to resolve factory classes.
KeystoreIsLocked
- Occurs when the requested key keystore cannot
be used because it has not been unlocked.
KeyIsLocked
- Occurs when the requested private key in the key
keystore cannot be used because it has not been
unlocked.
NoSuchAlgorithmException
UnrecoverableKeyException
KeyStoreException
KeyManagementException
NoSuchProviderException
public KeystoreInstance createKeystore(String name, char[] password)
name
- The name of the keystore to createpassword
- The password to use to protect the new keystorepublic KeystoreInstance[] getUnlockedKeyStores()
public KeystoreInstance[] getUnlockedTrustStores()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |