如何在新的Apache Http Client 4.3中创建SSL套接字工厂?
这是我在4.3之前创建它的方式
val ts = new TrustStrategy() {
def isTrusted(chain: Array[X509Certificate], authType: String): Boolean = true
}
new SSLSocketFactory(ts, SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER)
Run Code Online (Sandbox Code Playgroud)
现在SSLSocketFactory标记为已弃用.定义自定义的新方法是TrustStrategy什么?我无法理解.