Package org.jppf.ssl
Class SSLHelper2
java.lang.Object
org.jppf.ssl.SSLHelper2
Utility class handling all aspects of the SSL configuration.
- Author:
- Laurent Cohen
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigureJMXProperties(String protocol, Map<String, Object> env) Configure the SSL environment parameters for a JMX connector server or client.createSSLClientConnection(SocketWrapper socketClient) Create an SSL connection over an established plain socket connection.static StringdumpSSLParameters(SSLParameters params) Print the specified SSL parameters into a string.static StringgetClientConfigId(String driverName) Get the ssl configuration id for the specified driver name in the client configuration.getSSLContext(int identifier) Get a SSL context from the SSL configuration.Get SSL parameters from the configuration.
-
Constructor Details
-
SSLHelper2
- Parameters:
sslConfig- the SSL configuration.
-
-
Method Details
-
getSSLContext
Get a SSL context from the SSL configuration.- Parameters:
identifier- identifies the type of channel for which to get the SSL context.- Returns:
- a
SSLContextinstance. - Throws:
SSLConfigurationException- if any error occurs.
-
getSSLParameters
Get SSL parameters from the configuration.- Returns:
- a
SSLParametersinstance. - Throws:
Exception- if any error occurs.
-
createSSLClientConnection
Create an SSL connection over an established plain socket connection.- Parameters:
socketClient- the plain connection, already connected.- Returns:
- a
SocketWrapperwhose socket is anSSLSocketwrapping theSocketof the plain connection. - Throws:
Exception- if an error occurs while configuring the SSL parameters.
-
configureJMXProperties
Configure the SSL environment parameters for a JMX connector server or client.- Parameters:
protocol- the JMX remote protocol to use.env- the environment in which to add the SSL/TLS properties.- Throws:
Exception- if any error occurs.
-
getClientConfigId
Get the ssl configuration id for the specified driver name in the client configuration.- Parameters:
driverName- the name of the driver to build the id for.- Returns:
- an id composed of a property name and its value, in the form "driverName.property_suffix=value".
-
dumpSSLParameters
Print the specified SSL parameters into a string.- Parameters:
params- the parameters to print.- Returns:
- a formatted string describing the SSL parameters.
-