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!
Asked
Active
Viewed 5,562 times
1 Answers
8
The SslSocketFactory is now configured on the OkHttpClient.Builder
client = new OkHttpClient.Builder()
.sslSocketFactory(sslSocketFactory, trustManager)
.build();

Yuri Schimke
- 12,435
- 3
- 35
- 69
-
Thank you for the clarification! I tried this and it didn't help. It looks like the default protocols are still being used, i.e., when I watch the debugger I still see "TLS1" and "SSLv3" even after I told it to use TLSv1.2. I can understand if this is an old issue by using 4.2.2, I'm just stuck using that API. – Flatpick13 Jul 07 '16 at 18:09
-
Yep, I didn't look into how to enable TLSv1.2, just answering your what happened to setSslSocketFactory question. – Yuri Schimke Jul 07 '16 at 18:12