更新时间:2022-12-04 15:29:47
我已经使用默认套接字工厂测试了最新(3.11)OkHttp版本
I've tested the latest (3.11) OkHttp version with default socket factory
final SSLContext sslContext = SSLContext.getInstance(TLS);
sslContext.init(keyManagers, new TrustManager[]{ trustManager }, null);
sslContext.getSocketFactory();
final SSLContext sslContext = SSLContext.getInstance(TLS);
sslContext.init(keyManagers, new TrustManager[]{ trustManager }, null);
sslContext.getSocketFactory();
不幸的是,即使TLSv1.2可用,它也不是首选.现在,我必须继续使用自己的SSLSocketFactory实现,其中包括TLSv1.2.
Unfortunately, TLSv1.2 isn't preferred even though it is available. For now, I have to keep using my own implementation of SSLSocketFactory which includes TLSv1.2.