public class EasySSLSocketFactory extends Object implements LayeredSocketFactory
Modifier and Type | Field and Description |
---|---|
private SSLContext |
sslcontext |
Constructor and Description |
---|
EasySSLSocketFactory() |
Modifier and Type | Method and Description |
---|---|
Socket |
connectSocket(Socket sock,
String host,
int port,
InetAddress localAddress,
int localPort,
HttpParams params) |
private static SSLContext |
createIgnoreSSLContext() |
Socket |
createSocket() |
Socket |
createSocket(Socket socket,
String host,
int port,
boolean autoClose) |
boolean |
equals(Object obj) |
private SSLContext |
getSSLContext()
If you want to add more trusted certificates ( if self signed) for different sites, you should use
EasyX509TrustManager and create a instance with corresponding KeyStore and then add to the SSLContext.
|
int |
hashCode() |
boolean |
isSecure(Socket socket) |
private SSLContext sslcontext
private static SSLContext createIgnoreSSLContext() throws IOException
IOException
private SSLContext getSSLContext() throws IOException
IOException
public Socket connectSocket(Socket sock, String host, int port, InetAddress localAddress, int localPort, HttpParams params) throws IOException, UnknownHostException, ConnectTimeoutException
public Socket createSocket() throws IOException
createSocket
in interface SocketFactory
IOException
SocketFactory.createSocket()
public boolean isSecure(Socket socket) throws IllegalArgumentException
isSecure
in interface SocketFactory
IllegalArgumentException
SocketFactory.isSecure(java.net.Socket)
public Socket createSocket(Socket socket, String host, int port, boolean autoClose) throws IOException, UnknownHostException
createSocket
in interface LayeredSocketFactory
IOException
UnknownHostException
LayeredSocketFactory.createSocket(java.net.Socket,
java.lang.String, int, boolean)