public class TrustAllSslSocketFactory extends SocketFactoryImpl
Modifier and Type | Class and Description |
---|---|
private static class |
TrustAllSslSocketFactory.DummyTrustManager
Implementation of
X509TrustManager that trusts all
certificates. |
Modifier and Type | Field and Description |
---|---|
private static TrustAllSslSocketFactory |
DEFAULT |
private javax.net.ssl.SSLSocketFactory |
sslSocketFactory |
LINGER, OOBINLINE, SO_CONNECT_TIMEOUT, SO_KEEPALIVE, SO_LINGER, SO_RCVBUF, SO_REUSEADDR, SO_SNDBUF, SO_TIMEOUT, TCP_NODELAY
Modifier | Constructor and Description |
---|---|
protected |
TrustAllSslSocketFactory() |
Modifier and Type | Method and Description |
---|---|
java.net.Socket |
createSocket() |
java.net.Socket |
createSocket(java.net.InetAddress host,
int port) |
java.net.Socket |
createSocket(java.net.InetAddress address,
int port,
java.net.InetAddress localAddress,
int localPort) |
java.net.Socket |
createSocket(java.lang.String host,
int port) |
java.net.Socket |
createSocket(java.lang.String host,
int port,
java.net.InetAddress localHost,
int localPort) |
static javax.net.ssl.SSLSocketFactory |
createSSLSocketFactory()
Creates an "accept-all" SSLSocketFactory - ssl sockets will accept ANY
certificate sent to them - thus effectively just securing the
communications.
|
static TrustAllSslSocketFactory |
getDefault() |
static javax.net.ssl.SSLSocketFactory |
getDefaultSSLSocketFactory() |
applySettings
private static final TrustAllSslSocketFactory DEFAULT
private final javax.net.ssl.SSLSocketFactory sslSocketFactory
public java.net.Socket createSocket() throws java.io.IOException
createSocket
in class SocketFactoryImpl
java.io.IOException
public java.net.Socket createSocket(java.net.InetAddress host, int port) throws java.io.IOException
createSocket
in class SocketFactoryImpl
java.io.IOException
public java.net.Socket createSocket(java.net.InetAddress address, int port, java.net.InetAddress localAddress, int localPort) throws java.io.IOException
createSocket
in class SocketFactoryImpl
java.io.IOException
public java.net.Socket createSocket(java.lang.String host, int port) throws java.io.IOException
createSocket
in class SocketFactoryImpl
java.io.IOException
public java.net.Socket createSocket(java.lang.String host, int port, java.net.InetAddress localHost, int localPort) throws java.io.IOException
createSocket
in class SocketFactoryImpl
java.io.IOException
public static TrustAllSslSocketFactory getDefault()
SocketFactory.getDefault()
public static javax.net.ssl.SSLSocketFactory getDefaultSSLSocketFactory()
public static javax.net.ssl.SSLSocketFactory createSSLSocketFactory()
Copyright © 2012–2019 The Apache Software Foundation. All rights reserved.