SSLHandshake failed with Android 7
See original GitHub issueI have issues with Android 7, on Samsung A3. When making an SSL request to https://hsracer.com - here is the report from SSL Labs - https://www.ssllabs.com/ssltest/analyze.html?d=hsracer.com&latest We use OkHttp 3.9.0 with default configuration Stacktrace:
com.omisoft.hsracer E/com.omisoft.hsracer.common.loader.BaseServerAction: javax.net.ssl.SSLHandshakeException: Handshake failed
at `com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:444)`
at okhttp3.internal.connection.RealConnection.connectTls(RealConnection.java:299)
at okhttp3.internal.connection.RealConnection.establishProtocol(RealConnection.java:268)
at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:160)
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:11 (1 by maintainers)
Top Results From Across the Web
SSLHandshakeException: Handshake failed on Android N/7.0
Not too long ago, I started to work on an AVD with an image for 7.0 and to my suprise it won't connect...
Read more >SSL handshake failed on Android N/7.0, missing support for ...
Problem: Connecting to servers through SSL may fail on Android N devices. It may depend on the used cipher-suite or at least if...
Read more >Android 7.0 can't establish ssl connection - Help
I ran this command: android 7.0 can't connect. It produced this output: Caused by: javax.net.ssl.SSLProtocolException: SSL handshake ...
Read more >How to Fix issue of SSL Handshake Exception on Android
In my case, this issue existed because the server certificate was self signed. From android documentation there is a clean way to configure...
Read more >How to Fix “SSL Handshake Failed” & "Cloudflare 525" Error
24/7 expert support; The best Google Cloud Platform hardware and network, powered by Kubernetes for maximum scalability; An enterprise-level ...
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
@yschimke Hi! thanks for the response, i update Okhttp 3.14.9 to 4.8.1 but i have same issue. So, in the docs:
`OkHttp uses your platform’s built-in TLS implementation. On Java platforms OkHttp also supports Conscrypt, which integrates BoringSSL with Java. OkHttp will use Conscrypt if it is the first security provider:
Security.insertProviderAt(Conscrypt.newProvider(), 1);`
Library: implementation ‘org.conscrypt:conscrypt-android:2.5.0’
and in Application onCreate: Security.insertProviderAt(Conscrypt.newProvider(), 1);
Works in Android 7 using TLSv1.3!
I want to know if it’s the right thing to do, and if I only apply it to a specific api or to the entire app. My application supports at least api 21.
@yschimke the problem was with the preferred order of the SSL ciphers. The nginx configuration that didn’t work was: #
And the working one is:]=
I used https://www.ssllabs.com/ssltest to analyze the ssl config. Regards, Deyan