org.openorb.orb.ssl
Class JSSEContextFinder
java.lang.Object
|
+--org.apache.avalon.framework.logger.AbstractLogEnabled
|
+--org.openorb.orb.ssl.SSLContextFinder
|
+--org.openorb.orb.ssl.JSSEContextFinder
- All Implemented Interfaces:
- org.apache.avalon.framework.logger.LogEnabled
- Direct Known Subclasses:
- RSAContextFinder
- public class JSSEContextFinder
- extends SSLContextFinder
Creates JSSE-specific SSL contexts. In most applications
there will only be a single instance of this class, this
differs from most other orb parts in which there is one per VM...
This can be overloaded by an application to provide extended functionality
if required. Overloading classes are encouraged to use identical property
keys.
- Author:
- Sean Parker
|
Constructor Summary |
JSSEContextFinder()
This constructor, is followed by a call to setFactories, can be used
when sublclassing the context. |
|
Method Summary |
protected com.sun.net.ssl.KeyManager[] |
getKeyManagers(org.openorb.orb.config.ORBLoader loader)
Load the key managers. |
protected com.sun.net.ssl.TrustManager[] |
getTrustManagers(org.openorb.orb.config.ORBLoader loader)
Load trust managers. |
void |
initialize(org.openorb.orb.config.ORBLoader loader)
Default construction from properties. |
protected void |
initializeSocketFactories(org.openorb.orb.config.ORBLoader loader)
Initialize socket factories. |
protected java.net.URL |
promptKeystore(java.lang.String owner,
java.net.URL defl,
org.omg.CORBA.CharSeqHolder csh)
Prompt for a keystore and password. |
protected char[] |
promptPassword(java.lang.String owner,
java.net.URL defl)
Prompt for a password for the specified keystore. |
| Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JSSEContextFinder
public JSSEContextFinder()
- This constructor, is followed by a call to setFactories, can be used
when sublclassing the context.
initialize
public void initialize(org.openorb.orb.config.ORBLoader loader)
- Default construction from properties. Subclasses should implement a
constructor with an identical signature.
- Overrides:
initialize in class SSLContextFinder
- Parameters:
loader - The ORB loader.- Throws:
org.omg.CORBA.INITIALIZE - Indicates a problem locating
JSSE-related resources required by configuration.
initializeSocketFactories
protected void initializeSocketFactories(org.openorb.orb.config.ORBLoader loader)
- Initialize socket factories.
- Parameters:
loader - The ORB loader.
getKeyManagers
protected com.sun.net.ssl.KeyManager[] getKeyManagers(org.openorb.orb.config.ORBLoader loader)
- Load the key managers. Subclasses may overload to provide an alternate
key manager loading mechanism.
- Overrides:
getKeyManagers in class SSLContextFinder
- Parameters:
loader - The ORB loader.- Returns:
- An array of key managers.
- Throws:
org.omg.CORBA.INITIALIZE - Indicates a problem locating
JSSE-related resources required by configuration.
getTrustManagers
protected com.sun.net.ssl.TrustManager[] getTrustManagers(org.openorb.orb.config.ORBLoader loader)
- Load trust managers. Subclasses may overload to provide an alternate
trust manager loading mechanism.
- Overrides:
getTrustManagers in class SSLContextFinder
- Parameters:
loader - The ORB loader.- Returns:
- An array of TrusManagers.
- Throws:
org.omg.CORBA.INITIALIZE - Indicates a problem locating
JSSE-related resources required by configuration.
promptKeystore
protected java.net.URL promptKeystore(java.lang.String owner,
java.net.URL defl,
org.omg.CORBA.CharSeqHolder csh)
- Prompt for a keystore and password.
- Overrides:
promptKeystore in class SSLContextFinder
- Parameters:
owner - keystore owner. This will be "key manager" or "trust manager"defl - default URL obtained from properties.csh - out paramater, contains password on return.- Returns:
- Keystore URL.
promptPassword
protected char[] promptPassword(java.lang.String owner,
java.net.URL defl)
- Prompt for a password for the specified keystore.
- Overrides:
promptPassword in class SSLContextFinder
- Parameters:
owner - keystore owner. This will be "key manager" or "trust manager"defl - URL obtained from properties of the keystore.- Returns:
- Keystore password.