0

i recently installed An SSL certificate from Comodo on my website. after that i have been facing issues on my android app. the app fails to communicate with the web server. giving an error

javax.net.ssl.SSLPeerUnverifiedException: No peer certificate 

i have contacted my hosting service to look into the SSL chain and they say there is no issue on their end.

i am using this code to redirect all traffic from http to https on my website in the .htaccess file

RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]


RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

when i removed this code, everything works fine. how can i redirect the website traffic to https without creating issue in the app

Ahmed
  • 117
  • 2
  • 12

1 Answers1

1

SSLPeerUnverifiedException (more here)

It notifies you, that you network connection does not trust sertificate our server provide for it. You need to extend SSLSocketFactory in you mobile app to solve this problem (as one of ways is to trusting all of sertificates)

Hope it helps.

Community
  • 1
  • 1
busylee
  • 2,540
  • 1
  • 16
  • 35