问题handshakeFailure 错误 ssl证书问题
Re问题handshakeFailure 错误 ssl证书问题
连接服务器跳过ssl验证即可
SSLContext sc = SSLContext.getInstance('TLS');
sc.init(null, new TrustManager[]{new MyTrustManager()}, new SecureRandom());
HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
HttpsURLConnection.setDefaultHostnameVerifier(new MyHostnameVerifier());
HttpsURLConnection conn = (HttpsURLConnection)new URL(https).openConnection();
https为URL
赞0
踩0