4

I am trying to send a HTTP POST request (with images, but that should not matter) to a https-secured server using an AsyncHttpClient.

On Android 7+ everything seems to be working fine, the request finishes without errors. However, on Android 5 and 6, I am getting the following error message: javax.net.ssl.SSLException: hostname in certificate didn't match [...]

The server is using SNI, so I'm guessing that's the problem, but why would the connection work on Android 7+ with the same code? What is the best way to fix this? I am not allowed to make any changes on the server, so I have to find a workaround for my app.

munchybit
  • 41
  • 3

0 Answers0