
如何在Android中的HttpsUrlConnection禁用SSLv3的
2个回答
2016-10-14
展开全部
调用URL连接之前添加以下行:
java.lang.System.setProperty("https.protocols", "TLSv1");
就可以禁用SSLv3的。
java.lang.System.setProperty("https.protocols", "TLSv1");
就可以禁用SSLv3的。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2016-10-14
展开全部
I found the solution for it by analyzing the data packets using wireshark. What I found is that while making a secure connection, android was falling back to SSLv3 from TLSv1 . It is a bug in android versions < 4.4 , and it can be solved by removing the SSLv3 protocol from Enabled Protocols list. I made a custom socketFactory class called NoSSLv3SocketFactory.java. Use this to make a socketfactory.
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询