6

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?

Andrew
  • 20,756
  • 32
  • 99
  • 177
  • I am seeing the same problem. I get this exception at random times. Some time it works, some time it doesn't. I'm trying to see if this happens on any Android version. In the past, I've used the exact same code to access other https sites with no problem. This leads me to believe that the problem is in the way the server deals with SSL. I am also struggling to find a solution. If you have solved the issue, please share :) – Catalin Morosan May 25 '11 at 07:39
  • No peer certificate means server is not sending any cert, I believe your server is not configured properly to send the cert. try to access this url in browser and see what you are getting. If you can get this working in browser without any error (ssl errors) then it will work properly on android. – Naresh Jul 22 '11 at 08:25
  • If you have sloved this problem, please share :) – asedra_le Sep 20 '11 at 02:25

1 Answers1

1

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

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

Community
  • 1
  • 1
Andrew T.
  • 2,088
  • 1
  • 20
  • 42