How do you create SSL socket factory in new Apache Http Client 4.3 ?
Here is how I was creating it before 4.3
val ts = new TrustStrategy() {
def isTrusted(chain: Array[X509Certificate], authType: String): Boolean = true
}
new SSLSocketFactory(ts, SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER)
Now SSLSocketFactory
marked as deprecated. What is the new way of defining custom TrustStrategy
? I couldn't figure it out.