|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.geronimo.security.keystore.FileKeystoreManager
public class FileKeystoreManager
An implementation of KeystoreManager that assumes every file in a specified directory is a keystore.
| Field Summary | |
|---|---|
static org.apache.geronimo.gbean.GBeanInfo |
GBEAN_INFO
|
| Constructor Summary | |
|---|---|
FileKeystoreManager(URI keystoreDir,
org.apache.geronimo.system.serverinfo.ServerInfo serverInfo,
Collection keystores,
org.apache.geronimo.kernel.Kernel kernel)
|
|
| Method Summary | |
|---|---|
org.apache.geronimo.management.geronimo.KeystoreInstance |
createKeystore(String name,
char[] password)
|
SSLContext |
createSSLContext(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. |
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. |
void |
doFail()
|
void |
doStart()
|
void |
doStop()
|
X509Certificate |
generateCert(PublicKey publicKey,
PrivateKey privateKey,
String sigalg,
int validity,
String cn,
String ou,
String o,
String l,
String st,
String c)
|
static org.apache.geronimo.gbean.GBeanInfo |
getGBeanInfo()
|
org.apache.geronimo.management.geronimo.KeystoreInstance |
getKeystore(String name)
|
org.apache.geronimo.management.geronimo.KeystoreInstance[] |
getKeystores()
|
org.apache.geronimo.management.geronimo.KeystoreInstance[] |
getUnlockedKeyStores()
|
org.apache.geronimo.management.geronimo.KeystoreInstance[] |
getUnlockedTrustStores()
|
String[] |
listKeystoreFiles()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final org.apache.geronimo.gbean.GBeanInfo GBEAN_INFO
| Constructor Detail |
|---|
public FileKeystoreManager(URI keystoreDir,
org.apache.geronimo.system.serverinfo.ServerInfo serverInfo,
Collection keystores,
org.apache.geronimo.kernel.Kernel kernel)
| Method Detail |
|---|
public void doStart()
throws Exception
doStart in interface org.apache.geronimo.gbean.GBeanLifecycleException
public void doStop()
throws Exception
doStop in interface org.apache.geronimo.gbean.GBeanLifecycleExceptionpublic void doFail()
doFail in interface org.apache.geronimo.gbean.GBeanLifecyclepublic String[] listKeystoreFiles()
public org.apache.geronimo.management.geronimo.KeystoreInstance[] getKeystores()
getKeystores in interface org.apache.geronimo.management.geronimo.KeystoreManagerpublic org.apache.geronimo.management.geronimo.KeystoreInstance getKeystore(String name)
public SSLSocketFactory createSSLFactory(String provider,
String protocol,
String algorithm,
String trustStore,
ClassLoader loader)
throws org.apache.geronimo.management.geronimo.KeystoreException
createSSLFactory in interface org.apache.geronimo.management.geronimo.KeystoreManagerprovider - 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.
org.apache.geronimo.management.geronimo.KeystoreIsLocked - Occurs when the requested key keystore cannot
be used because it has not been unlocked.
org.apache.geronimo.management.geronimo.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
org.apache.geronimo.management.geronimo.KeystoreException
public SSLSocketFactory createSSLFactory(String provider,
String protocol,
String algorithm,
String keyStore,
String keyAlias,
String trustStore,
ClassLoader loader)
throws org.apache.geronimo.management.geronimo.KeystoreException
createSSLFactory in interface org.apache.geronimo.management.geronimo.KeystoreManagerprovider - 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.
org.apache.geronimo.management.geronimo.KeystoreIsLocked - Occurs when the requested key keystore cannot
be used because it has not been unlocked.
org.apache.geronimo.management.geronimo.KeyIsLocked - Occurs when the requested private key in the key
keystore cannot be used because it has not been
unlocked.
org.apache.geronimo.management.geronimo.KeystoreException
public SSLServerSocketFactory createSSLServerFactory(String provider,
String protocol,
String algorithm,
String keyStore,
String keyAlias,
String trustStore,
ClassLoader loader)
throws org.apache.geronimo.management.geronimo.KeystoreException
createSSLServerFactory in interface org.apache.geronimo.management.geronimo.KeystoreManagerprovider - 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.
org.apache.geronimo.management.geronimo.KeystoreIsLocked - Occurs when the requested key keystore cannot
be used because it has not been unlocked.
org.apache.geronimo.management.geronimo.KeyIsLocked - Occurs when the requested private key in the key
keystore cannot be used because it has not been
unlocked.
org.apache.geronimo.management.geronimo.KeystoreException
public SSLContext createSSLContext(String provider,
String protocol,
String algorithm,
String keyStore,
String keyAlias,
String trustStore,
ClassLoader loader)
throws org.apache.geronimo.management.geronimo.KeystoreException
createSSLContext in interface org.apache.geronimo.management.geronimo.KeystoreManagerprovider - 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.
org.apache.geronimo.management.geronimo.KeystoreIsLocked - Occurs when the requested key keystore cannot
be used because it has not been unlocked.
org.apache.geronimo.management.geronimo.KeyIsLocked - Occurs when the requested private key in the key
keystore cannot be used because it has not been
unlocked.
org.apache.geronimo.management.geronimo.KeystoreException
public org.apache.geronimo.management.geronimo.KeystoreInstance createKeystore(String name,
char[] password)
throws org.apache.geronimo.management.geronimo.KeystoreException
createKeystore in interface org.apache.geronimo.management.geronimo.KeystoreManagerorg.apache.geronimo.management.geronimo.KeystoreExceptionpublic org.apache.geronimo.management.geronimo.KeystoreInstance[] getUnlockedKeyStores()
getUnlockedKeyStores in interface org.apache.geronimo.management.geronimo.KeystoreManagerpublic org.apache.geronimo.management.geronimo.KeystoreInstance[] getUnlockedTrustStores()
getUnlockedTrustStores in interface org.apache.geronimo.management.geronimo.KeystoreManagerpublic static org.apache.geronimo.gbean.GBeanInfo getGBeanInfo()
public X509Certificate generateCert(PublicKey publicKey,
PrivateKey privateKey,
String sigalg,
int validity,
String cn,
String ou,
String o,
String l,
String st,
String c)
throws SignatureException,
InvalidKeyException
SignatureException
InvalidKeyException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||