AsyncHttpClient / async-http-client

Asynchronous Http and WebSocket Client library for Java
Other
6.28k stars 1.59k forks source link

AHC 1.9 throw handshake error at second time request #891

Closed ghost closed 9 years ago

ghost commented 9 years ago

I found a SSL server that first time request is OK, but second time is handshake error when use AHC 1.9. However, AHC 1.8 has no error at any time.

I think some SSL config of the server will cause this problem. But the server is in private network, so I cannot share the URL. And sorry, I could not find websites that cause same problem.

This issue is similer to #828 (Is it solved ?)

slandelle commented 9 years ago

The main difference regarding SSL between AHC 1.8 and 1.9 is that 1.9 used a custom very insecure implementation for dealing with certificate hostname validation, while 1.9 uses the standard Java way that was introduced in Java 7: http://docs.oracle.com/javase/7/docs/api/javax/net/ssl/SSLParameters.html#setEndpointIdentificationAlgorithm(java.lang.String)

Without a reproducer, there's nothing I can do.

ghost commented 9 years ago

Thank you for reply.

That's right. I'll find a reproducer or cause and post new issue.

Sorry for taking time.

slandelle commented 9 years ago

Sorry I can't do more, but AHC works fine for me, both for proper certificates, and self signed ones.

slandelle commented 9 years ago

Can't reproduce. Closing until user provides a reproducer.

jagte commented 9 years ago

I am having the same issue. I posted a response here: https://groups.google.com/forum/#!topic/gatling/QEMYnZsVI-k

ghost commented 8 years ago

I tried AHC 2.0-RC1, and handshake error did not appeared at second time request.

Thank you.

slandelle commented 8 years ago

Great. Thanks for your feedback.