org.apache.geronimo.corba.security.config.ssl
Class SSLConfig

java.lang.Object
  extended by org.apache.geronimo.corba.security.config.ssl.SSLConfig

public class SSLConfig
extends Object

An active SSL configuration. The SSL configuration identifies the KeystoreManager instance to be used for SSL connections, as well as the specifics of the certificates to be used for the connections. The socket factories attached to the CORBA ORBs used the SSLConfig to retrieve SocketFactory instances for creating the secure sockets.


Constructor Summary
SSLConfig()
          Default GBean constructor.
SSLConfig(KeystoreManager keystoreManager)
          "Normal" constructor for config items.
 
Method Summary
 SSLSocketFactory createSSLFactory(ClassLoader loader)
          Create an SSLServerSocketFactory instance for creating server-side SSL connections.
 SSLServerSocketFactory createSSLServerFactory(ClassLoader loader)
          Create an SSLSocketFactory instance for creating client-side SSL connections.
 String getAlgorithm()
          The encryption algorithm to use.
 String getKeyAlias()
          Retrieve the key alias name to use.
 String getKeyStore()
          Retrieve the name of the keystore.
 String getProtocol()
          Get the protocol to be used by this SSL configuration.
 String getProvider()
          Retrieve the encryption provider to be used for these connnections.
 String getTrustStore()
          Retrieve the in-use truststore name.
 void setAlgorithm(String algorithm)
          Algorithm to use.
 void setKeyAlias(String keyAlias)
          Set the key alias to be used for the connection.
 void setKeyStore(String keyStore)
          Set the name of the keystore to be used for this connection.
 void setProtocol(String protocol)
          Set the protocol to be used by this configuration.
 void setProvider(String provider)
          Set a new encryption provider for the SSL access.
 void setTrustStore(String trustStore)
          Set the name of the truststore to be used for connections.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SSLConfig

public SSLConfig()
Default GBean constructor.


SSLConfig

public SSLConfig(KeystoreManager keystoreManager)
"Normal" constructor for config items.

Parameters:
keystoreManager - The keystoreManager instance used to create SSL sockets for this configuration.
Method Detail

createSSLFactory

public SSLSocketFactory createSSLFactory(ClassLoader loader)
                                  throws KeystoreException
Create an SSLServerSocketFactory instance for creating server-side SSL connections.

Parameters:
loader - The class loader used to resolve classes required by the KeystoreManager.
Returns:
An SSLServerSocketFactory instance created with the SSLConfig specifices.
Throws:
KeystoreException - When a problem occurs while creating the factory.

createSSLServerFactory

public SSLServerSocketFactory createSSLServerFactory(ClassLoader loader)
                                              throws KeystoreException
Create an SSLSocketFactory instance for creating client-side SSL connections.

Parameters:
loader - The class loader used to resolve classes required by the KeystoreManager.
Returns:
An SSLSocketFactory instance created with the SSLConfig specifices.
Throws:
KeystoreException - When a problem occurs while creating the factory.

getProtocol

public String getProtocol()
Get the protocol to be used by this SSL configuration. Normally, this is just "SSL".

Returns:
The String name of the configuration protocol.

setProtocol

public void setProtocol(String protocol)
Set the protocol to be used by this configuration.

Parameters:
protocol - The new protocol name.

getProvider

public String getProvider()
Retrieve the encryption provider to be used for these connnections.

Returns:
The current provider name.

setProvider

public void setProvider(String provider)
Set a new encryption provider for the SSL access.

Parameters:
provider - The new provider name.

getAlgorithm

public String getAlgorithm()
The encryption algorithm to use.

Returns:
The current encryption algorithm.

setAlgorithm

public void setAlgorithm(String algorithm)
Algorithm to use. As different JVMs have different implementations available, the default algorithm can be used by supplying the value "Default".

Parameters:
algorithm - the algorithm to use, or "Default" to use the default from KeyManagerFactory.getDefaultAlgorithm()

setKeyStore

public void setKeyStore(String keyStore)
Set the name of the keystore to be used for this connection. This must be the name of a keystore stored within the KeystoreManager instance.

Parameters:
keyStore - The key store String name.

getKeyStore

public String getKeyStore()
Retrieve the name of the keystore.

Returns:
The String key store name.

setTrustStore

public void setTrustStore(String trustStore)
Set the name of the truststore to be used for connections. The truststore must map to one managed by the KeystoreManager instance.

Parameters:
trustStore - The new trustStore name.

getTrustStore

public String getTrustStore()
Retrieve the in-use truststore name.

Returns:
The String name of the trust store.

setKeyAlias

public void setKeyAlias(String keyAlias)
Set the key alias to be used for the connection.

Parameters:
keyAlias - The String name of the key alias.

getKeyAlias

public String getKeyAlias()
Retrieve the key alias name to use.

Returns:
The String name of the key alias.


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