Use insecure socketFactory if "accept all certificates"

b/9176386

Change-Id: I1edc92bb4207d166e9b252bf3ed98ad8b2c4d996
This commit is contained in:
Martin Hibdon 2013-08-15 17:45:36 -07:00
parent 64fa58a0bc
commit 8708594f03

View File

@ -144,7 +144,7 @@ public class SSLUtils {
HostAuth hostAuth, boolean insecure) {
if (insecure) {
SSLCertificateSocketFactory insecureFactory = (SSLCertificateSocketFactory)
SSLCertificateSocketFactory.getDefault(0, null);
SSLCertificateSocketFactory.getInsecure(0, null);
insecureFactory.setTrustManagers(
new TrustManager[] {
new SameCertificateCheckingTrustManager(context, hostAuth)});