I'm using OkHttp 3.4.0-RC1. I'm trying to write a web service that connects an Android 4.2.2 / API 17 device via TLSv1.2. I saw the answer at the bottom of this post Android Enable TLSv1.2 in OKHttp but apparently the method setSslSocketFactory is no longer present. I also did not see anything in the Https doc on OKHttp. Thanks!
The SslSocketFactory is now configured on the OkHttpClient.Builder
client = new OkHttpClient.Builder()
.sslSocketFactory(sslSocketFactory, trustManager)
.build();
https://github.com/square/okhttp/blob/3f7a3344a4c85aa3bbb879dabac5ee625ab987f3/samples/guide/src/main/java/okhttp3/recipes/CustomTrust.java#L54
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With