0

I connected my app via "https" to my server, like the official page says: https://developer.android.com/training/articles/security-ssl.html (just replaced http with https) My domain has got the ssl certificate, so its not on the server. It works on android 6 but it does not work on devices running android 5 or lower to get a ssl connection. Does anyone know how to get my code work on android 5 and lower? Do I need to implement a special SSLSocketFactory?

Im looking forward to your response. Thanks:)

bamas
  • 11
  • 2
  • Can you add your code to the question? Please provide more details when about what doesn't work. If you are getting exceptions, add the full stack trace. – Eric Levine Jun 14 '16 at 17:14
  • 'javax.net.ssl.SSLPeerUnverifiedException: no peer certificate' its just a normal HttpClient, on android 6 it works fine, but the same httpClient throws this exception on android 5 devices – bamas Jun 14 '16 at 17:25
  • How did you get the SSL certificate? Is it self generated? – Eric Levine Jun 14 '16 at 17:33
  • You might be using a self-signed certificate, which is not authenticated by phone's CA. Check [this](https://developer.android.com/training/articles/security-ssl.html#SelfSigned) and [this](http://stackoverflow.com/questions/2740975/https-with-self-signed-ssl-certificate-issues-solution-or-better-way). – solosodium Jun 14 '16 at 18:00
  • No, it is a SingleDomain Certificate bought at www.strato.de where also my server is hosted. So I hat just to replace "http" with "https" and the connection was secured, but unfortunately it does not work on android 5 or lower devices. – bamas Jun 14 '16 at 18:05

0 Answers0