I am trying to do a simple HttpGet to read a webpage. I have this working on iOS and working on Android over http, but not https.
The url is an internal network IP a
When searching for this exception, all you get is the advice to implement "allow all certs".
The javadoc for SSLPeerUnverifiedException states:
When the peer was not able to identify itself (for example; no certificate, the particular cipher suite being used does not support authentication, or no peer authentication was established during SSL handshaking) this exception is thrown.
So the error might be that the connection is so flaky/unstable and requests take ridiculous amounts of time. In our mobile app we sometimes experience lot's of connection/Socket-Timeouts in combination with these SSLPeerUnverifiedException. Some requests get through but take 60s+ - the network connection simply sucks beyond all means in these cases.
Simply brute forcing this with the "allow all certs" is not advisable in such cases - rather implement a proper retry strategy.