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