org.apache.geronimo.management.geronimo
Interface KeystoreManager

All Known Implementing Classes:
FileKeystoreManager

public interface KeystoreManager

Management interface for working with keystores. Mostly this is used to identify KeystoreInstances to work with individual keystores.

See Also:
KeystoreInstance

Method Summary
 KeystoreInstance createKeystore(String name, char[] password)
          Creates a new, empty keystore.
 SSLContext createSSLContext(String provider, String protocol, String algorithm, String keyStore, String keyAlias, String trustStore, ClassLoader loader)
           
 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

getKeystores

KeystoreInstance[] getKeystores()
Gets the names of the keystores available in the server.


createSSLServerFactory

SSLServerSocketFactory createSSLServerFactory(String provider,
                                              String protocol,
                                              String algorithm,
                                              String keyStore,
                                              String keyAlias,
                                              String trustStore,
                                              ClassLoader loader)
                                              throws KeystoreException
Gets a ServerSocketFactory using one Keystore to access the private key and another to provide the list of trusted certificate authorities.

Parameters:
provider - The SSL provider to use, or null for the default
protocol - The SSL protocol to use
algorithm - The SSL algorithm to use
keyStore - 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.
Throws:
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.
KeystoreException

createSSLFactory

SSLSocketFactory createSSLFactory(String provider,
                                  String protocol,
                                  String algorithm,
                                  String keyStore,
                                  String keyAlias,
                                  String trustStore,
                                  ClassLoader loader)
                                  throws KeystoreException
Gets a SocketFactory using one Keystore to access the private key and another to provide the list of trusted certificate authorities.

Parameters:
provider - The SSL provider to use, or null for the default
protocol - The SSL protocol to use
algorithm - The SSL algorithm to use
keyStore - 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.
Throws:
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.
KeystoreException

createSSLFactory

SSLSocketFactory createSSLFactory(String provider,
                                  String protocol,
                                  String algorithm,
                                  String trustStore,
                                  ClassLoader loader)
                                  throws KeystoreException
Gets a SocketFactory using one Keystore to access the private key and another to provide the list of trusted certificate authorities.

Parameters:
provider - The SSL provider to use, or null for the default
protocol - The SSL protocol to use
algorithm - The SSL algorithm to use
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.
Throws:
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.
KeystoreException

createKeystore

KeystoreInstance createKeystore(String name,
                                char[] password)
                                throws KeystoreException
Creates a new, empty keystore. The name should be a valid file name with no path separator characters.

Parameters:
name - The name of the keystore to create
password - The password to use to protect the new keystore
Throws:
KeystoreException

getUnlockedKeyStores

KeystoreInstance[] getUnlockedKeyStores()
Gets the aliases for any keystores that are available to be used as private key keystores for an SSL factory. This means the keystore is unlocked and contains at least one private key that's unlocked.


getUnlockedTrustStores

KeystoreInstance[] getUnlockedTrustStores()
Gets the aliases for any keystores that are available to be used as trusted certificate keystores for an SSL factory. This means the keystore is unlocked and contains at least one trust certificate.


createSSLContext

SSLContext createSSLContext(String provider,
                            String protocol,
                            String algorithm,
                            String keyStore,
                            String keyAlias,
                            String trustStore,
                            ClassLoader loader)
                            throws KeystoreException
Throws:
KeystoreException


Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.