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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user