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:

http://community.godaddy.com/help/5238

Apache SSL IfDefine – Error

Just encountered a problem that was painful to deal with while configuring SSL on apache for linux.  The httpd.conf had a tag, , before all the SSL configuration lines.  In order for any commands within and to be loaded on service start, you must use the -D attribute like this.

$ service httpd -D SSL -k start

Also, I found that restart does not always take new changes to my conf files.

$ service httpd -D SSL -k restart

Instead, use the stop then the start command to be sure.

$service httpd -D SSL -k stop
$service httpd -D SSL -k start

That was a source of much pain while working on this particular server.