没有同行证书。不知道采取哪条路线同行、路线、证书

2023-09-06 00:27:54 作者:Amnesia(失忆)

我想打一个HTTPS URL与我的应用程序。我已经遵循本教程。我创建了这家商店有正确的CA.但是,当我尝试进行连接,我得到以下错误:

I'm trying to hit an https url with my app. I've followed this tutorial. The store I've created has the correct CA. However, when I try to make the connection, I get the following error:

ERROR/IOException(1843): webPost: javax.net.ssl.SSLPeerUnverifiedException: No peer certificate

我已经做了一些阅读有关此错误,人们已决定让自己的应用程序来接受所有证书。我不认为这真的可以接受的。我应该检查旁边看的是什么问题?

I've done some reading about this error and people have decided to allow their apps to accept all certificates. I don't think that's really acceptable. What should I check next to see what the issue is?

推荐答案

您可以配置设备忽略SSL证书: http://www.virtualzone.de/2011-02-27/how-to-use-apache-httpclient-with-httpsssl-on-android/(dead链接) UPDATE:更好的答案是明显的在这里: Trusting使用HttpClient的所有证书通过HTTPS

You can configure your device to ignore SSL certificates: http://www.virtualzone.de/2011-02-27/how-to-use-apache-httpclient-with-httpsssl-on-android/(dead link) UPDATE: Much better answer is visible here: Trusting all certificates using HttpClient over HTTPS

或做具体的事情你HttpClient的版本: HttpGet使用HTTPS:SSLPeerUnverifiedException

Or do things specific to your HttpClient version: HttpGet with HTTPS : SSLPeerUnverifiedException