Removed catch-all hostname verifier if a cert is present
This commit is contained in:
@@ -67,7 +67,6 @@ public class CertUtils {
|
|||||||
context.init(new KeyManager[] {}, trustManagers, new SecureRandom());
|
context.init(new KeyManager[] {}, trustManagers, new SecureRandom());
|
||||||
builder.sslSocketFactory(
|
builder.sslSocketFactory(
|
||||||
context.getSocketFactory(), (X509TrustManager) trustManagers[0]);
|
context.getSocketFactory(), (X509TrustManager) trustManagers[0]);
|
||||||
builder.hostnameVerifier((a, b) -> true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user