QuickServer
v1.4.7

org.quickserver.security
Class SecureStoreManager

java.lang.Object
  extended byorg.quickserver.security.SecureStoreManager

public class SecureStoreManager
extends java.lang.Object

Class that loads Key Managers, Trust Managers, SSLContext and other secure objects from QuickServer configuration passed. See <secure-store-manager> in <secure-store> to set new manger to load your SecureStore. This class can be overridden to change the way QuickServer configures the secure mode.

Since:
1.4
Author:
Akshathkumar Shetty
See Also:
SecureStore

Constructor Summary
SecureStoreManager()
           
 
Method Summary
protected  java.security.KeyStore getKeyStoreForKey(java.lang.String type, java.lang.String provider)
          Generates a keystore object for the specified keystore type from the specified provider to be used for loading/storeing keys.
protected  java.security.KeyStore getKeyStoreForTrust(java.lang.String type, java.lang.String provider)
          Generates a keystore object for the specified keystore type from the specified provider to be used for loading/storing trusted keys/certificates.
 javax.net.ssl.SSLSocketFactory getSocketFactory(javax.net.ssl.SSLContext context)
          Returns a SSLSocketFactory object to be used for creating SSLSockets.
 javax.net.ssl.SSLContext getSSLContext(java.lang.String protocol)
          Generates a SSLContext object that implements the specified secure socket protocol.
 javax.net.ssl.KeyManager[] loadKeyManagers(QuickServerConfig config)
          Loads KeyManagers.
 javax.net.ssl.TrustManager[] loadTrustManagers(QuickServerConfig config)
          Loads TrustManagers.
 void logSSLServerSocketInfo(javax.net.ssl.SSLServerSocket sslServerSocket)
          Can be used to log details about the SSLServerSocket used to create a secure server [SSL/TLS].
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecureStoreManager

public SecureStoreManager()
Method Detail

loadKeyManagers

public javax.net.ssl.KeyManager[] loadKeyManagers(QuickServerConfig config)
                                           throws java.security.GeneralSecurityException,
                                                  java.io.IOException
Loads KeyManagers. KeyManagers are responsible for managing the key material which is used to authenticate the local SSLSocket to its peer. Can return null.

Throws:
java.security.GeneralSecurityException
java.io.IOException

loadTrustManagers

public javax.net.ssl.TrustManager[] loadTrustManagers(QuickServerConfig config)
                                               throws java.security.GeneralSecurityException,
                                                      java.io.IOException
Loads TrustManagers. TrustManagers are responsible for managing the trust material that is used when making trust decisions, and for deciding whether credentials presented by a peer should be accepted. Can return null.

Throws:
java.security.GeneralSecurityException
java.io.IOException

getSSLContext

public javax.net.ssl.SSLContext getSSLContext(java.lang.String protocol)
                                       throws java.security.NoSuchAlgorithmException
Generates a SSLContext object that implements the specified secure socket protocol.

Throws:
java.security.NoSuchAlgorithmException

getKeyStoreForKey

protected java.security.KeyStore getKeyStoreForKey(java.lang.String type,
                                                   java.lang.String provider)
                                            throws java.security.KeyStoreException,
                                                   java.security.NoSuchProviderException
Generates a keystore object for the specified keystore type from the specified provider to be used for loading/storeing keys.

Parameters:
type - the type of keystore
provider - the name of the provider if null any provider package that implements this type of key may be given based on the priority.
Throws:
java.security.KeyStoreException
java.security.NoSuchProviderException

getKeyStoreForTrust

protected java.security.KeyStore getKeyStoreForTrust(java.lang.String type,
                                                     java.lang.String provider)
                                              throws java.security.KeyStoreException,
                                                     java.security.NoSuchProviderException
Generates a keystore object for the specified keystore type from the specified provider to be used for loading/storing trusted keys/certificates.

Parameters:
type - the type of keystore
provider - the name of the provider if null any provider package that implements this type of key may be given based on the priority.
Throws:
java.security.KeyStoreException
java.security.NoSuchProviderException

getSocketFactory

public javax.net.ssl.SSLSocketFactory getSocketFactory(javax.net.ssl.SSLContext context)
Returns a SSLSocketFactory object to be used for creating SSLSockets.


logSSLServerSocketInfo

public void logSSLServerSocketInfo(javax.net.ssl.SSLServerSocket sslServerSocket)
Can be used to log details about the SSLServerSocket used to create a secure server [SSL/TLS]. This method can also be overridden to change the enabled cipher suites and/or enabled protocols.


QuickServer
v1.4.7

Copyright © 2003-2006 QuickServer.org