29Nov/110
Android making https requests with SSL from GoDaddy – No peer certificate error
Another hair pulling session that all ended well.
Task:
Make a secure call to a server using a httprequest and get the httpresponse for further processing.
Android http request and response:
HttpClient client = new DefaultHttpClient();
HttpGet req = new HttpGet("https://www.example.com");
HttpResponse res = client.execute(req);
Error:
javax.net.ssl.SSLPeerUnverifiedException: No peer certificate
Problem:
The issue is that cert from GoDaddy was installed but not installed completely. An Intermediate cert is required for the server/domain in order to have a fully installed cert.
Reference: