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
IOExceptionprivate SSLContext getSSLContext() throws IOException
IOExceptionpublic 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 SocketFactoryIOExceptionSocketFactory.createSocket()public boolean isSecure(Socket socket) throws IllegalArgumentException
isSecure in interface SocketFactoryIllegalArgumentExceptionSocketFactory.isSecure(java.net.Socket)public Socket createSocket(Socket socket, String host, int port, boolean autoClose) throws IOException, UnknownHostException
createSocket in interface LayeredSocketFactoryIOExceptionUnknownHostExceptionLayeredSocketFactory.createSocket(java.net.Socket,
java.lang.String, int, boolean)