Use insecure socketFactory if "accept all certificates"
b/9176386 Change-Id: I1edc92bb4207d166e9b252bf3ed98ad8b2c4d996
This commit is contained in:
parent
64fa58a0bc
commit
8708594f03
@ -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)});
|
||||
|
Loading…
Reference in New Issue
Block a user