Created working Anonymous TLS example
This commit is contained in:
parent
3ea5b1ec06
commit
3399ca2619
|
|
@ -32,6 +32,11 @@ import javax.net.ssl.SSLSocketFactory;
|
|||
*/
|
||||
public class AnonymousSocketFactory extends SocketFactory {
|
||||
|
||||
@Override
|
||||
public Socket createSocket() throws IOException {
|
||||
return fixSocket((SSLSocket) SSLSocketFactory.getDefault().createSocket());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Socket createSocket(String host, int port) throws IOException, UnknownHostException {
|
||||
return fixSocket((SSLSocket) SSLSocketFactory.getDefault().createSocket(host, port));
|
||||
|
|
|
|||
Loading…
Reference in New Issue