Howto use TLS 1.0 in Android
I want to connect to a local device which supports only TLS 1.0. The device’s firmware cannot be updated thus I am stuck to this protocol version. SSLContext sslContext = SSLContext.getInstance("TLSv1"); sslContext.init(null, null, null); SSLSocketFactory sslSocketFactory = sslContext.getSocketFactory(); URL url = new URL("https://192.168.1.10/command?action=2"); HttpsURLConnection httpsURLConnection = (HttpsURLConnection) url.openConnection(); httpsURLConnection.setSSLSocketFactory(sslSocketFactory); // Create an InputStreamReader to read