Class SSLClientConfigurator
- java.lang.Object
-
- org.glassfish.admin.mbeanserver.ssl.SSLClientConfigurator
-
public class SSLClientConfigurator extends 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:
- [email protected]
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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, KeyManagerprotected Collection<? extends CRL>
getCRLs(String crlf)
Load the collection of CRLs.String[]
getEnabledCipherSuites()
gets a list of Enabled Cipher SuitesString
getEnabledCipherSuitesAsString()
Returns a list of Enabled Cipher Suites as a StringString[]
getEnabledProtocols()
Gets a list of Enabled ProtocolsString
getEnabledProtocolsAsString()
Returns the list of Enabled Protocols as a comma separated Stringstatic SSLClientConfigurator
getInstance()
protected KeyManager[]
getKeyManagers(String algorithm, String keyAlias)
Gets the initialized key managers.protected CertPathParameters
getParameters(String algorithm, String crlf, KeyStore trustStore)
Return the initialization parameters for the TrustManager.protected TrustManager[]
getTrustManagers(String algorithm)
Gets the intialized trust managers.void
setSSLParams(SSLParams sslParams)
-
-
-
Method Detail
-
getInstance
public static SSLClientConfigurator getInstance()
-
setSSLParams
public void setSSLParams(SSLParams sslParams)
-
configure
public 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 String[] getEnabledProtocols()
Gets a list of Enabled Protocols- Returns:
-
getEnabledProtocolsAsString
public String getEnabledProtocolsAsString()
Returns the list of Enabled Protocols as a comma separated String- Returns:
-
getEnabledCipherSuites
public String[] getEnabledCipherSuites()
gets a list of Enabled Cipher Suites- Returns:
-
getEnabledCipherSuitesAsString
public String getEnabledCipherSuitesAsString()
Returns a list of Enabled Cipher Suites as a String- Returns:
-
getKeyManagers
protected KeyManager[] getKeyManagers(String algorithm, String keyAlias) throws Exception
Gets the initialized key managers.- Throws:
Exception
-
getTrustManagers
protected TrustManager[] getTrustManagers(String algorithm) throws Exception
Gets the intialized trust managers.- Throws:
Exception
-
getParameters
protected CertPathParameters getParameters(String algorithm, String crlf, KeyStore trustStore) throws Exception
Return the initialization parameters for the TrustManager. Currently, only the defaultPKIX
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:
Exception
-
getCRLs
protected Collection<? extends CRL> getCRLs(String crlf) throws IOException, CRLException, CertificateException
Load the collection of CRLs.
-
-