javax.net.ssl.SSLHandshakeException: Handshake failed
See original GitHub issueI am trying to call pixabay api and I’m getting this error.
com.androidnetworking.error.ANError: javax.net.ssl.SSLHandshakeException: Handshake failed
Can you help me solve this? I have done some research and found it’s related to https and ssl security, but nothing I understand from those materials.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top Results From Across the Web
javax.net.ssl.SSLHandshakeException: Handshake failed on ...
Here is my trouble, I'm using retrofit:1.9.0 and okhttp:2.7.5 to perform API call. Everything was fine until my server provider disable SLLv2 and...
Read more >SSL Handshake Failures - Baeldung
This particular failure is caused by the fact that our server is using a self-signed certificate which is not signed by a Certificate...
Read more >How to Fix javax.net.ssl.SSLHandshakeException - Java67
SSLHandshakeException: unable to find valid certification path to requested target in Java. Hello guys, this is one of the common errors in a...
Read more >javax.net.ssl.SSLHandshakeException: Handshake failed ...
I am using android studio 3.4.1 and I am in Shanghai of China. HTTP FAILED: javax.net.ssl.SSLHandshakeException: Handshake failed. Hope hear ...
Read more >Handshake failed during wrap javax.net.ssl ...
Handshake failed during wrap javax.net.ssl.SSLHandshakeException error seen in Bitbucket ...
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
@Joeeeyy Try this :
Go to https://www.ssllabs.com and check your domain name to see what Ciphersuites your server is using. Configuration - > Cipher Suites (i.e TLS 1.2 / TLS 1.1 ,etc). Then check the “Handshake Simulation” info as well to understand compatibility for each Android version.
If you are using nginx for your backend, add the following lines to your ssl-params config
ssl_ciphers "ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS";
For the Frontend, use unsafeOkhttp but include all the ciphersuites that your server supports. This is my configuration as an example:
private static OkHttpClient myUnsafeHttpClient() {
}
Initialize Androidnetworking as follows :
AndroidNetworking.initialize(getApplicationContext(), myUnsafeHttpClient());
This worked for me after a Week of struggle…Hope it helps anyone in need!
Check your android device’s date and time