android httpclient ssl证书不受信任的godaddy ssl

时间:2013-04-27 19:31:33

标签: android ssl httpclient

我的服务器上有一个GoDaddy ssl证书,当我尝试使用我的Android应用程序访问url时,它会抛出一个异常:“不信任的服务器证书”

我的代码是:

HttpPost post = new HttpPost(url);
HttpClient client = new DefaultHttpClient();
HttpResponse response;
response = client.execute(post);
HttpEntity entity = response.getEntity();
return(EntityUtils.toString(entity));

由于

0 个答案:

没有答案