org.glassfish.admin.mbeanserver.ssl
Class SSLClientConfigurator

java.lang.Object
  extended by org.glassfish.admin.mbeanserver.ssl.SSLClientConfigurator

public class SSLClientConfigurator
extends java.lang.Object

This class is a utility class that would configure a client socket factory using either the SSL defaults for GlassFish or via params supplied. This is a singleton class. The initial use for this class is to configure the SslRMIClientSocketFactory for use with the JMX connector.

Author:
prasads@dev.java.net

Method Summary
 javax.net.ssl.SSLContext configure(SSLParams sslParams)
          This method creates an SSLContext based on the default provider and then created TrustManagers, KeyManagers and initializes the SSLContext with the TrustManager, KeyManager
protected  java.util.Collection<? extends java.security.cert.CRL> getCRLs(java.lang.String crlf)
          Load the collection of CRLs.
 java.lang.String[] getEnabledCipherSuites()
          gets a list of Enabled Cipher Suites
 java.lang.String getEnabledCipherSuitesAsString()
          Returns a list of Enabled Cipher Suites as a String
 java.lang.String[] getEnabledProtocols()
          Gets a list of Enabled Protocols
 java.lang.String getEnabledProtocolsAsString()
          Returns the list of Enabled Protocols as a comma separated String
static SSLClientConfigurator getInstance()
           
protected  javax.net.ssl.KeyManager[] getKeyManagers(java.lang.String algorithm, java.lang.String keyAlias)
          Gets the initialized key managers.
protected  java.security.cert.CertPathParameters getParameters(java.lang.String algorithm, java.lang.String crlf, java.security.KeyStore trustStore)
          Return the initialization parameters for the TrustManager.
protected  javax.net.ssl.TrustManager[] getTrustManagers(java.lang.String algorithm)
          Gets the intialized trust managers.
 void setSSLParams(SSLParams sslParams)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static SSLClientConfigurator getInstance()

setSSLParams

public void setSSLParams(SSLParams sslParams)

configure

public javax.net.ssl.SSLContext configure(SSLParams sslParams)
This method creates an SSLContext based on the default provider and then created TrustManagers, KeyManagers and initializes the SSLContext with the TrustManager, KeyManager

Returns:
SSLContext

getEnabledProtocols

public java.lang.String[] getEnabledProtocols()
Gets a list of Enabled Protocols

Returns:

getEnabledProtocolsAsString

public java.lang.String getEnabledProtocolsAsString()
Returns the list of Enabled Protocols as a comma separated String

Returns:

getEnabledCipherSuites

public java.lang.String[] getEnabledCipherSuites()
gets a list of Enabled Cipher Suites

Returns:

getEnabledCipherSuitesAsString

public java.lang.String getEnabledCipherSuitesAsString()
Returns a list of Enabled Cipher Suites as a String

Returns:

getKeyManagers

protected javax.net.ssl.KeyManager[] getKeyManagers(java.lang.String algorithm,
                                                    java.lang.String keyAlias)
                                             throws java.lang.Exception
Gets the initialized key managers.

Throws:
java.lang.Exception

getTrustManagers

protected javax.net.ssl.TrustManager[] getTrustManagers(java.lang.String algorithm)
                                                 throws java.lang.Exception
Gets the intialized trust managers.

Throws:
java.lang.Exception

getParameters

protected java.security.cert.CertPathParameters getParameters(java.lang.String algorithm,
                                                              java.lang.String crlf,
                                                              java.security.KeyStore trustStore)
                                                       throws java.lang.Exception
Return the initialization parameters for the TrustManager. Currently, only the default PKIX is supported.

Parameters:
algorithm - The algorithm to get parameters for.
crlf - The path to the CRL file.
trustStore - The configured TrustStore.
Returns:
The parameters including the CRLs and TrustStore.
Throws:
java.lang.Exception

getCRLs

protected java.util.Collection<? extends java.security.cert.CRL> getCRLs(java.lang.String crlf)
                                                                  throws java.io.IOException,
                                                                         java.security.cert.CRLException,
                                                                         java.security.cert.CertificateException
Load the collection of CRLs.

Throws:
java.io.IOException
java.security.cert.CRLException
java.security.cert.CertificateException


Copyright © 2012 GlassFish Community. All Rights Reserved.