Android https服务器连接无对等

Android https服务器连接无对等,android,https,Android,Https,我正在开发android应用程序,它通过https连接连接到服务器。 我已使用受信任的证书创建了我的_store.bks文件,并使用以下代码连接到服务器: DefaultHttpClient httpclient = new DefaultHttpClient(); KeyStore trustStore = KeyStore.getInstance("BKS"); InputStream in = context.getResources().openRawResource(R.raw.my

我正在开发android应用程序,它通过https连接连接到服务器。 我已使用受信任的证书创建了我的_store.bks文件,并使用以下代码连接到服务器:

DefaultHttpClient httpclient = new DefaultHttpClient();
KeyStore trustStore  = KeyStore.getInstance("BKS");
InputStream in = context.getResources().openRawResource(R.raw.my_store);
try{ 
  trustStore.load(in,pass.toCharArray());
}
catch(Exception e){
  Log.v("MyLog", "errror reading sert: " + e.toString());
}
finally{
  in.close();
}
SSLSocketFactory socketFactory = new SSLSocketFactory(trustStore);
Scheme sch = new Scheme("https", socketFactory, 443);
httpclient.getConnectionManager().getSchemeRegistry().register(sch);


HttpPost poster = new HttpPost(serverAdress);
UrlEncodedFormEntity ent = new UrlEncodedFormEntity(formparams,"UTF-8");
poster.setEntity(ent);

HttpResponse responsePost = httpclient.execute(poster);    
但当我执行这段代码时,我遇到了下一个错误:

javax.net.ssl.SSLPeerUnverifiedException: No peer certificate  No peer certificate    
这里有一些类似的问题 但我不想忽略SSL证书。 有人知道可能是什么吗?可能是服务器错误吗?(服务器正在开发中,因此可能会有错误,但在浏览器中,它可以与sert配合使用)