1
0
mirror of https://github.com/owncloud/android-library.git synced 2026-08-11 16:33:03 +00:00

Refactored test project to work correctly with AdvancedSslSocketFactory as base to create sockets

This commit is contained in:
David A. Velasco
2014-11-11 13:37:30 +01:00
parent 5a67c8b4fe
commit 5f11b3d998
3 changed files with 20 additions and 36 deletions
@@ -78,8 +78,11 @@ public class AdvancedSslSocketFactory implements SecureProtocolSocketFactory {
if (sslContext == null)
throw new IllegalArgumentException("AdvancedSslSocketFactory can not be created with a null SSLContext");
if (trustManager == null)
throw new IllegalArgumentException("AdvancedSslSocketFactory can not be created with a null Trust Manager");
if (trustManager == null && mHostnameVerifier != null)
throw new IllegalArgumentException(
"AdvancedSslSocketFactory can not be created with a null Trust Manager and a " +
"not null Hostname Verifier"
);
mSslContext = sslContext;
mTrustManager = trustManager;
mHostnameVerifier = hostnameVerifier;