Skip to content

Instantly share code, notes, and snippets.

View MichaelNien's full-sized avatar

MichaelNien

  • 中華民國
View GitHub Profile
@MichaelNien
MichaelNien / TLSSocketFactory.java
Created March 13, 2018 05:06 — forked from fkrauthan/TLSSocketFactory.java
Custom SSLSocketFactory Implementation to enable tls 1.1 and tls 1.2 for android 4.1 (16+)
package net.cogindo.ssl;
import java.io.IOException;
import java.net.InetAddress;
import java.net.Socket;
import java.net.UnknownHostException;
import java.security.KeyManagementException;
import java.security.NoSuchAlgorithmException;
import javax.net.ssl.SSLContext;