org.opensaml.ws.soap.client.http
@ThreadSafe public class TLSProtocolSocketFactory extends Object implements org.apache.commons.httpclient.protocol.SecureProtocolSocketFactory
Modifier and Type | Field and Description |
---|---|
private X509KeyManager |
keyManager
Manager used to retrieve client-cert authentication keys for a given host.
|
private SSLContext |
sslContext
Currently active SSL context.
|
private X509TrustManager |
trustManager
Manager used to validate the X.509 credentials of a given host.
|
Constructor and Description |
---|
TLSProtocolSocketFactory(X509KeyManager keyMgr,
X509TrustManager trustMgr)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Socket |
createSocket(Socket socket,
String host,
int port,
boolean autoClose) |
Socket |
createSocket(String host,
int port) |
Socket |
createSocket(String host,
int port,
InetAddress localHost,
int clientPort) |
Socket |
createSocket(String host,
int port,
InetAddress localHost,
int localPort,
org.apache.commons.httpclient.params.HttpConnectionParams connParams) |
boolean |
equals(Object obj) |
int |
hashCode() |
private X509KeyManager keyManager
private X509TrustManager trustManager
private SSLContext sslContext
public TLSProtocolSocketFactory(X509KeyManager keyMgr, X509TrustManager trustMgr) throws IllegalArgumentException
keyMgr
- manager used to retrieve client-cert authentication keys for a given hosttrustMgr
- manager used to validate the X.509 credentials of a given hostIllegalArgumentException
- thrown if the given key or trust manager can not be used to create the
SSLContext
used to create new socketspublic Socket createSocket(String host, int port) throws IOException
createSocket
in interface org.apache.commons.httpclient.protocol.ProtocolSocketFactory
IOException
public Socket createSocket(String host, int port, InetAddress localHost, int clientPort) throws IOException
createSocket
in interface org.apache.commons.httpclient.protocol.ProtocolSocketFactory
IOException
public Socket createSocket(Socket socket, String host, int port, boolean autoClose) throws IOException
createSocket
in interface org.apache.commons.httpclient.protocol.SecureProtocolSocketFactory
IOException
public Socket createSocket(String host, int port, InetAddress localHost, int localPort, org.apache.commons.httpclient.params.HttpConnectionParams connParams) throws IOException
createSocket
in interface org.apache.commons.httpclient.protocol.ProtocolSocketFactory
IOException
Copyright © 1999-2013 JBoss by Red Hat. All Rights Reserved.