Fix hostname verifier for Exchange connections.
When the socketfactory init code was moved, I forgot to re-add in the check to skip hostname verification. This made "Trust all SSL certificates" checkbox useless. Bug: 5450563 Change-Id: Ie4cba749aaf8c0fd9f9c43f09ebf354c6600d4f0
This commit is contained in:
parent
2949d48f1d
commit
4d3f3f3ab9
@ -74,7 +74,11 @@ public class SSLUtils {
|
|||||||
if (keyManager != null) {
|
if (keyManager != null) {
|
||||||
underlying.setKeyManagers(new KeyManager[] { keyManager });
|
underlying.setKeyManagers(new KeyManager[] { keyManager });
|
||||||
}
|
}
|
||||||
return new SSLSocketFactory(underlying);
|
SSLSocketFactory wrapped = new SSLSocketFactory(underlying);
|
||||||
|
if (insecure) {
|
||||||
|
wrapped.setHostnameVerifier(SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);
|
||||||
|
}
|
||||||
|
return wrapped;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user