OkHttpClient.setSslSocketFactory missing from OkHttp v3?
See original GitHub issueHello,
Apologies in advance if I have missed it, but the method OkHttpClient.setSslSocketFactory
appears to be missing from v3 of the API.
I am using this call to enable TLS on Android < 5:
OkHttpClient client = new OkHttpClient();
client.setSslSocketFactory(new TLSSocketFactory());
Where TLSSocketFactory
is described here: http://blog.dev-area.net/2015/08/13/android-4-1-enable-tls-1-1-and-tls-1-2/
Is there an alternative way of doing this in v3?
Issue Analytics
- State:
- Created 8 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
OKHttp - Can't find setSslSocketFactory - Stack Overflow
The SslSocketFactory is now configured on the OkHttpClient.Builder client = new OkHttpClient.Builder() .sslSocketFactory(sslSocketFactory ...
Read more >OkHttpClient.Builder (OkHttp 3.11.0 API) - javadoc.io
Sets the socket factory used to secure HTTPS connections. If unset, the system default will be used. sslSocketFactory. public OkHttpClient.Builder ...
Read more >HTTPS - OkHttp - Square Open Source
When negotiating a connection to an HTTPS server, OkHttp needs to know which TLS versions and cipher suites to offer. A client that...
Read more >Trusting a Self-Signed Certificate in OkHttp - Baeldung
Learn how to configure an OkHttpClient to trust self-signed certificates.
Read more >Maximizing OkHttp connection reuse | by Diego Gómez Olvera
Debugging a 3rd party library ... In Booking.com we use OkHttp, an HTTP client library for Java/JVM clients ... sslSocketFactory, that.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Try the builder:
Thanks @yschimke I have shared the question in stack overflow
https://stackoverflow.com/questions/51421713/volley-with-okhttp-is-not-using-the-overwritten-tls-version-instead-it-is-taking
@swankjesse