0

I use Apache for HTTP requests for my android app but I got a little problem that I can't find a solution. I'm able to do a get request to a website URL like google or stuff like that but I can't do the same for my server on a Docker with an Url like "https://xxx.xxx.xxx.xxx/api..." I get this error:

System.err: javax.net.ssl.SSLException: Certificate for <xxx.xxx.xxx.xxx> doesn't contain CN or DNS subjectAlt

Does anyone have a solution for me in order to be able to make requests to my docker? thanks,

  • `with a DNS like "https://xxx.xxx.xxx.xxx/api..."` That is no DNS but an url. Further you should not call a dns service if you use an ip address if that is what you do. Please explain better. – blackapps Aug 31 '20 at 12:20
  • Can you use a browser on your pc? And a browser on your Android device? – blackapps Aug 31 '20 at 12:36
  • Hi, Thanks for your response. Actually I want to make an HTTP request to my API on a docker in order to get a token from Cookies. URLs of the API looks like "https://192.168.xxx.xxx/api/..." but I tried to make a request with my code and I get the error: "System.err: javax.net.ssl.SSLException: Certificate for doesn't contain CN or DNS subjectAlt" and I can't find a solution to solve it. Sorry about my bad explanation I'm very not at ease with HTTP stuff. – LoloSwingue Aug 31 '20 at 12:39
  • And i have no idea what you mean by Docker. – blackapps Aug 31 '20 at 13:54
  • Your issue is that you'ar acessing your server in https using its IP address. Look here: https://stackoverflow.com/questions/2043617/is-it-possible-to-have-ssl-certificate-for-ip-address-not-domain-name – StephaneM Aug 31 '20 at 14:45

0 Answers0