public class SSLConnectionFactory extends Object
| Constructor and Description |
|---|
SSLConnectionFactory()
Constructor for the SSL connection factory.
|
| Modifier and Type | Method and Description |
|---|---|
Socket |
createSocket(InetAddress host,
int portNumber)
Create the SSL socket connection to the specified host.
|
Socket |
createSocket(Socket s,
String hostName,
int portNumber,
boolean autoClose)
Create the SSL socket connection to the specified host layered over
an existing socket.
|
Socket |
createSocket(String hostName,
int portNumber)
Create the SSL socket connection to the specified host.
|
void |
init(boolean trustAll,
String keyStorePath,
String keyStorePassword,
String clientAlias,
String trustStorePath,
String trustStorePassword)
Initialize the connection factory by creating the key and
trust managers for the SSL connection.
|
public SSLConnectionFactory()
public void init(boolean trustAll, String keyStorePath, String keyStorePassword, String clientAlias, String trustStorePath, String trustStorePassword) throws SSLConnectionException
trustAll - Indicates whether to blindly trust all
certificates.keyStorePath - The path to the key store file.keyStorePassword - The PIN to use to access the key store
contents.clientAlias - The alias to use for the client certificate.trustStorePath - The path to the trust store file.trustStorePassword - The PIN to use to access the trust store
contents.SSLConnectionException - If a problem occurs while initializing the
connection factory.public Socket createSocket(String hostName, int portNumber) throws SSLConnectionException, IOException
hostName - The address of the system to which the connection
should be established.portNumber - The port number to which the connection should be
established.SSLConnectionException - If a problem occurs while performing SSL
negotiation.IOException - If a problem occurs while attempting to communicate
with the server.public Socket createSocket(InetAddress host, int portNumber) throws SSLConnectionException, IOException
host - The address of the system to which the connection should be
established.portNumber - The port number to which the connection should be established.SSLConnectionException - If a problem occurs while performing SSL negotiation.IOException - If a problem occurs while attempting to communicate with the
server.public Socket createSocket(Socket s, String hostName, int portNumber, boolean autoClose) throws SSLConnectionException, IOException
s - The socket to use for the existing connection.hostName - The address of the system to which the connection
should be established.portNumber - The port number to which the connection should be
established.autoClose - Indicates whether the underlying connection should be
automatically closed when the SSL session is ended.SSLConnectionException - If a problem occurs while performing SSL
negotiation.IOException - If a problem occurs while attempting to communicate
with the server.Copyright © 2010-2015 ForgeRock AS. All Rights Reserved.