android-4.0.3-ice-cream-sandwich

Javax.net.ssl.SSLHandshakeException: javax.net.ssl.SSLProtocolException: SSL handshake aborted: Failure in SSL library, usually a protocol error

人走茶凉 提交于 2019-11-26 00:31:50
问题 I am trying to run the following code in android URLConnection l_connection = null; // Create connection uzip=new UnZipData(mContext); l_url = new URL(serverurl); if (\"https\".equals(l_url.getProtocol())) { System.out.println(\"<<<<<<<<<<<<< Before TLS >>>>>>>>>>>>\"); sslcontext = SSLContext.getInstance(\"TLS\"); System.out.println(\"<<<<<<<<<<<<< After TLS >>>>>>>>>>>>\"); sslcontext.init(null, new TrustManager[] { new CustomTrustManager()}, new java.security.SecureRandom());

Javax.net.ssl.SSLHandshakeException: javax.net.ssl.SSLProtocolException: SSL handshake aborted: Failure in SSL library, usually a protocol error

孤者浪人 提交于 2019-11-25 18:44:35
I am trying to run the following code in android URLConnection l_connection = null; // Create connection uzip=new UnZipData(mContext); l_url = new URL(serverurl); if ("https".equals(l_url.getProtocol())) { System.out.println("<<<<<<<<<<<<< Before TLS >>>>>>>>>>>>"); sslcontext = SSLContext.getInstance("TLS"); System.out.println("<<<<<<<<<<<<< After TLS >>>>>>>>>>>>"); sslcontext.init(null, new TrustManager[] { new CustomTrustManager()}, new java.security.SecureRandom()); HttpsURLConnection .setDefaultHostnameVerifier(new CustomHostnameVerifier()); HttpsURLConnection.setDefaultSSLSocketFactory