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 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 |
|---|---|
Socket |
createSocket() |
Socket |
createSocket(InetAddress host,
int port) |
Socket |
createSocket(InetAddress address,
int port,
InetAddress localAddress,
int localPort) |
Socket |
createSocket(String host,
int port) |
Socket |
createSocket(String host,
int port,
InetAddress localHost,
int localPort) |
static 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 SSLSocketFactory |
getDefaultSSLSocketFactory() |
applySettingsprivate static final TrustAllSslSocketFactory DEFAULT
private final SSLSocketFactory sslSocketFactory
public Socket createSocket() throws IOException
createSocket in class SocketFactoryImplIOExceptionpublic Socket createSocket(InetAddress host, int port) throws IOException
createSocket in class SocketFactoryImplIOExceptionpublic Socket createSocket(InetAddress address, int port, InetAddress localAddress, int localPort) throws IOException
createSocket in class SocketFactoryImplIOExceptionpublic Socket createSocket(String host, int port) throws IOException
createSocket in class SocketFactoryImplIOExceptionpublic Socket createSocket(String host, int port, InetAddress localHost, int localPort) throws IOException
createSocket in class SocketFactoryImplIOExceptionpublic static TrustAllSslSocketFactory getDefault()
SocketFactory.getDefault()public static SSLSocketFactory getDefaultSSLSocketFactory()
public static SSLSocketFactory createSSLSocketFactory()
Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.