Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

javax.net.ssl.SSLHandshakeException: Handshake failed #1940

Closed
IgorGanapolsky opened this issue Oct 22, 2015 · 12 comments
Closed

javax.net.ssl.SSLHandshakeException: Handshake failed #1940

IgorGanapolsky opened this issue Oct 22, 2015 · 12 comments

Comments

@IgorGanapolsky
Copy link

Hi,
I am trying to make a GET request to an HTTPS server (over VPN). I followed the guidelines described in this issue: #1628. However, it's keeps giving me an error:

javax.net.ssl.SSLHandshakeException: Handshake failed

I am using Retrofit 2.0.0-beta2 in my Android application for this networking code. Please advise.

Thank you,
Igor

@artem-zinnatullin
Copy link
Contributor

Try to connect to your https endpoint via browser/another_http_client through the VPN, there are high chances that VPN is the reason of your problems.

@IgorGanapolsky
Copy link
Author

No, VPN is not the problem. Connected to VPN, I am able to hit this
server through the browser on Android. I just can't hit it in my app.
On Oct 22, 2015 7:49 PM, "Artem Zinnatullin" notifications@github.com
wrote:

Try to connect to your https endpoint via browser/another_http_client
through the VPN, there are high chances that VPN is the reason of your
problems.


Reply to this email directly or view it on GitHub
#1940 (comment).

@artem-zinnatullin
Copy link
Contributor

ok, is it reachable via OkHttp without VPN? If not — (why you mentioned that you're doing it over VPN…) it may be a problem of https configuration on the backend so you can contact their support with this issue.

@IgorGanapolsky
Copy link
Author

My point is that VPN is necessary to hit this particular server. And I can
reach it through the browser. But not through the app on the phone. Both

  • my computer and Android phone - have VPN configs set up. Makes sense?
    On Oct 22, 2015 7:57 PM, "Artem Zinnatullin" notifications@github.com
    wrote:

ok, is it reachable via OkHttp without VPN? If not — (why you mentioned
that you're doing it over VPN…) it may be a problem of https configuration
on the backend so you can contact their support with this issue.


Reply to this email directly or view it on GitHub
#1940 (comment).

@swankjesse
Copy link
Collaborator

Could you provide a test case to demonstrate the problem?

@IgorGanapolsky
Copy link
Author

What's the best way to simulate VPN and a TLS server in a test case? I
cannot reveal my company's server details - obviously.
On Oct 22, 2015 10:38 PM, "Jesse Wilson" notifications@github.com wrote:

Could you provide a test case to demonstrate the problem?


Reply to this email directly or view it on GitHub
#1940 (comment).

@swankjesse
Copy link
Collaborator

@IgorGanapolsky sounds like a duplicate of a bug we're already tracking.
#1780

@IgorGanapolsky
Copy link
Author

@swankjesse You linked to an enhancent PR?

@swankjesse
Copy link
Collaborator

Yes. It's a feature request.

@tulasi-ram
Copy link

Throwing the below error in onFailure() call back method
javax.net.ssl.SSLHandshakeException: Handshake failed

i'm using below libraries
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.google.code.gson:gson:2.6.2'

Any one of please help me on this..

@morbidcamel101
Copy link

Having similar problems - inspecting the SSLException reveals BAD_ALERT - any ideas?

@elong4321
Copy link

I meet the same problem now, have you fix this ? please help~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants