2

2 days I'm reading blog/answer/docs but no solution. I have a SimpleHosting on Gandi's servers with a SSL certificate https://auth.ruchers.net

As you can see, the certificate is valid.

But when I try to connect to this page with my DefaultHttpClient class I receive a [No peer certificate] error. My code is the same as you can find here : http://blog.antoine.li/2010/10/22/android-trusting-ssl-certificates/

I read here Android SSL No peer certificate and here Android SSL - No Peer Certificate that the problem could be the order of the certificate chain... Ok, let's go, I'll control the chain :

openssl s_client -connect auth.ruchers.net:443

return

... no peer certificate available ...

To have a correct answer I need to specifie the servername

openssl s_client -connect auth.ruchers.net:443 -servername auth.ruchers.net

How can I say to my SSLSocketFactory to use "auth.ruchers.net" as servername for this certificate ?

Thank you for the help.

Best Regards, Greg

Community
  • 1
  • 1
Greg
  • 21
  • 3
  • i think u r requesting https o port 443 to defaultHttpClient – KOTIOS Apr 27 '15 at 13:32
  • you need to have a library with SNI support. The one shipped with the SDK does not have SNI support. See http://blog.dev001.net/post/67082904181/android-using-sni-and-tlsv1-2-with-apache – Steffen Ullrich Apr 27 '15 at 17:27

0 Answers0