public class TLSProtocolSocketFactory extends Object implements org.apache.commons.httpclient.protocol.SecureProtocolSocketFactory
Constructor and Description |
---|
TLSProtocolSocketFactory(KeyManager keyManager,
Set<String> trustedKeys,
String sslHostnameVerification)
Default constructor, which initializes socket factory to trust all keys with alias from the trusted
keys as found in the keyManager.
|
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) |
protected org.opensaml.xml.security.x509.PKIXValidationInformationResolver |
getPKIXResolver()
Method is expected to construct information resolver with all trusted data available for the given provider.
|
protected org.apache.commons.httpclient.protocol.SecureProtocolSocketFactory |
initializeDelegate()
Initializes internal SocketFactory used to create all sockets.
|
protected boolean |
isHostnameVerificationSupported()
Check for the latest OpenSAML library.
|
public TLSProtocolSocketFactory(KeyManager keyManager, Set<String> trustedKeys, String sslHostnameVerification)
keyManager
- key manager includes all cryptography material for the SAML instancetrustedKeys
- when not set all certificates included in the keystore will be used as trusted certificate authorities. When specified, only keys with the defined aliases will be used for trust evaluation.sslHostnameVerification
- type of hostname verificationpublic 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
protected org.apache.commons.httpclient.protocol.SecureProtocolSocketFactory initializeDelegate()
protected org.opensaml.xml.security.x509.PKIXValidationInformationResolver getPKIXResolver()
protected boolean isHostnameVerificationSupported()