间歇性PeerUnverifiedException:没有与Android客户端的对等证书

Fer*_*ago 5 apache ssl https android ssl-certificate

我正在尝试使用HTTPS实现Android↔Apache通信,但我收到以下错误.我间歇性地遇到问题,大约30%的时间.

javax.net.ssl.sslPeerUnverifiedException: No peer certificate
Run Code Online (Sandbox Code Playgroud)

我在网上搜索,但任何答案都帮助了我......

这是我的Android代码:

http_post = new HttpPost(Utils.IP_ADDRESS);
http_post_data = new ArrayList<NameValuePair>();
http_post_data.add(new BasicNameValuePair("regId", regid));
http_post_data.add(new BasicNameValuePair("email", globals.userInfo.mail));
http_post_data.add(new BasicNameValuePair("pass", globals.userInfo.pass));
http_post.setEntity(new UrlEncodedFormEntity(http_post_data));

HttpParams httpParameters = new BasicHttpParams();
HttpConnectionParams.setConnectionTimeout(httpParameters, Utils.TIMEOUT_CONNECTION);
HttpConnectionParams.setSoTimeout(httpParameters, Utils.TIMEOUT_SOCKET);

http_client = new DefaultHttpClient(httpParameters);
response = http_client.execute(http_post);
String responseBody = EntityUtils.toString(response.getEntity(), GlobalsSingleton.applicationCharset);
Run Code Online (Sandbox Code Playgroud)

我有GoDaddy证书.那么我需要更改我的服务器或Android代码才能解决这个问题?

cod*_*Boy 0

我能够通过重新启动模拟器或创建新模拟器并在新模拟器中运行项目来自己解决这个问题。