Class SSLClientConfigurator
java.lang.Object
org.glassfish.admin.mbeanserver.ssl.SSLClientConfigurator
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
Modifier and TypeMethodDescriptionThis 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> Load the collection of CRLs.String[]gets a list of Enabled Cipher SuitesReturns a list of Enabled Cipher Suites as a StringString[]Gets a list of Enabled ProtocolsReturns the list of Enabled Protocols as a comma separated Stringstatic SSLClientConfiguratorprotected KeyManager[]getKeyManagers(String algorithm, String keyAlias) Gets the initialized key managers.protected CertPathParametersgetParameters(String algorithm, String crlf, KeyStore trustStore) Return the initialization parameters for the TrustManager.protected TrustManager[]getTrustManagers(String algorithm) voidsetSSLParams(SSLParams sslParams)
-
Method Details
-
getInstance
-
setSSLParams
-
configure
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
Gets a list of Enabled Protocols- Returns:
-
getEnabledProtocolsAsString
Returns the list of Enabled Protocols as a comma separated String- Returns:
-
getEnabledCipherSuites
gets a list of Enabled Cipher Suites- Returns:
-
getEnabledCipherSuitesAsString
Returns a list of Enabled Cipher Suites as a String- Returns:
-
getKeyManagers
Gets the initialized key managers.- Throws:
Exception
-
getTrustManagers
- Returns:
- the intialized trust managers or null
- Throws:
Exception
-
getParameters
protected CertPathParameters getParameters(String algorithm, String crlf, KeyStore trustStore) throws Exception Return the initialization parameters for the TrustManager. Currently, only the defaultPKIXis 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.
-