org.apache.karaf.jaas.config.impl
Class OsgiKeystoreManager

java.lang.Object
  extended by org.apache.karaf.jaas.config.impl.OsgiKeystoreManager
All Implemented Interfaces:
KeystoreManager

public class OsgiKeystoreManager
extends java.lang.Object
implements KeystoreManager

Implementation of KeystoreManager


Constructor Summary
OsgiKeystoreManager()
           
 
Method Summary
 javax.net.ssl.SSLContext createSSLContext(java.lang.String provider, java.lang.String protocol, java.lang.String algorithm, java.lang.String keyStore, java.lang.String keyAlias, java.lang.String trustStore)
          Gets a SSLContext using one Keystore to access the private key and another to provide the list of trusted certificate authorities.
 javax.net.ssl.SSLSocketFactory createSSLFactory(java.lang.String provider, java.lang.String protocol, java.lang.String algorithm, java.lang.String keyStore, java.lang.String keyAlias, java.lang.String trustStore)
          Gets a SocketFactory using one Keystore to access the private key and another to provide the list of trusted certificate authorities.
 javax.net.ssl.SSLServerSocketFactory createSSLServerFactory(java.lang.String provider, java.lang.String protocol, java.lang.String algorithm, java.lang.String keyStore, java.lang.String keyAlias, java.lang.String trustStore)
          Gets a ServerSocketFactory using one Keystore to access the private key and another to provide the list of trusted certificate authorities.
 KeystoreInstance getKeystore(java.lang.String name)
           
 void register(KeystoreInstance keystore, java.util.Map<java.lang.String,?> properties)
           
 void unregister(KeystoreInstance keystore, java.util.Map<java.lang.String,?> properties)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OsgiKeystoreManager

public OsgiKeystoreManager()
Method Detail

register

public void register(KeystoreInstance keystore,
                     java.util.Map<java.lang.String,?> properties)

unregister

public void unregister(KeystoreInstance keystore,
                       java.util.Map<java.lang.String,?> properties)

getKeystore

public KeystoreInstance getKeystore(java.lang.String name)
Specified by:
getKeystore in interface KeystoreManager

createSSLContext

public javax.net.ssl.SSLContext createSSLContext(java.lang.String provider,
                                                 java.lang.String protocol,
                                                 java.lang.String algorithm,
                                                 java.lang.String keyStore,
                                                 java.lang.String keyAlias,
                                                 java.lang.String trustStore)
                                          throws java.security.GeneralSecurityException
Description copied from interface: KeystoreManager
Gets a SSLContext using one Keystore to access the private key and another to provide the list of trusted certificate authorities.

Specified by:
createSSLContext in interface KeystoreManager
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.
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.
java.security.GeneralSecurityException

createSSLServerFactory

public javax.net.ssl.SSLServerSocketFactory createSSLServerFactory(java.lang.String provider,
                                                                   java.lang.String protocol,
                                                                   java.lang.String algorithm,
                                                                   java.lang.String keyStore,
                                                                   java.lang.String keyAlias,
                                                                   java.lang.String trustStore)
                                                            throws java.security.GeneralSecurityException
Description copied from interface: KeystoreManager
Gets a ServerSocketFactory using one Keystore to access the private key and another to provide the list of trusted certificate authorities.

Specified by:
createSSLServerFactory in interface KeystoreManager
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.
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.
java.security.GeneralSecurityException

createSSLFactory

public javax.net.ssl.SSLSocketFactory createSSLFactory(java.lang.String provider,
                                                       java.lang.String protocol,
                                                       java.lang.String algorithm,
                                                       java.lang.String keyStore,
                                                       java.lang.String keyAlias,
                                                       java.lang.String trustStore)
                                                throws java.security.GeneralSecurityException
Description copied from interface: KeystoreManager
Gets a SocketFactory using one Keystore to access the private key and another to provide the list of trusted certificate authorities.

Specified by:
createSSLFactory in interface KeystoreManager
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.
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.
java.security.GeneralSecurityException


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