brooklyn.test
Class TrustingSslSocketFactory
java.lang.Object
javax.net.SocketFactory
javax.net.ssl.SSLSocketFactory
brooklyn.test.TrustingSslSocketFactory
public class TrustingSslSocketFactory
- extends SSLSocketFactory
|
Method Summary |
static
|
configure(T connection)
configures a connection to accept all certificates, if it is for https |
Socket |
createSocket()
|
Socket |
createSocket(InetAddress arg0,
int arg1)
|
Socket |
createSocket(InetAddress arg0,
int arg1,
InetAddress arg2,
int arg3)
|
Socket |
createSocket(Socket socket,
String host,
int port,
boolean autoClose)
|
Socket |
createSocket(String arg0,
int arg1)
|
Socket |
createSocket(String arg0,
int arg1,
InetAddress arg2,
int arg3)
|
String[] |
getDefaultCipherSuites()
|
static TrustingSslSocketFactory |
getInstance()
|
String[] |
getSupportedCipherSuites()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TRUST_ALL
public static final TrustManager TRUST_ALL
- trusts all SSL certificates
TrustingSslSocketFactory
protected TrustingSslSocketFactory()
getInstance
public static TrustingSslSocketFactory getInstance()
configure
public static <T extends URLConnection> T configure(T connection)
- configures a connection to accept all certificates, if it is for https
createSocket
public Socket createSocket(Socket socket,
String host,
int port,
boolean autoClose)
throws IOException,
UnknownHostException
- Specified by:
createSocket in class SSLSocketFactory
- Throws:
IOException
UnknownHostException
createSocket
public Socket createSocket()
throws IOException
- Overrides:
createSocket in class SocketFactory
- Throws:
IOException
getDefaultCipherSuites
public String[] getDefaultCipherSuites()
- Specified by:
getDefaultCipherSuites in class SSLSocketFactory
getSupportedCipherSuites
public String[] getSupportedCipherSuites()
- Specified by:
getSupportedCipherSuites in class SSLSocketFactory
createSocket
public Socket createSocket(String arg0,
int arg1)
throws IOException,
UnknownHostException
- Specified by:
createSocket in class SocketFactory
- Throws:
IOException
UnknownHostException
createSocket
public Socket createSocket(InetAddress arg0,
int arg1)
throws IOException
- Specified by:
createSocket in class SocketFactory
- Throws:
IOException
createSocket
public Socket createSocket(String arg0,
int arg1,
InetAddress arg2,
int arg3)
throws IOException,
UnknownHostException
- Specified by:
createSocket in class SocketFactory
- Throws:
IOException
UnknownHostException
createSocket
public Socket createSocket(InetAddress arg0,
int arg1,
InetAddress arg2,
int arg3)
throws IOException
- Specified by:
createSocket in class SocketFactory
- Throws:
IOException
Copyright © 2013. All Rights Reserved.