Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTTPS request on old iphone 3g

Anyone else having issues with getting a https request working on the old iphone.

From connection did fail with error the error message is as follows.

ERROR with theConnection:Error Domain=NSURLErrorDomain Code=-1202 "The certificate for this server is invalid. You might be connecting to a server that is pretending to be “www.ourwesbite.co.uk” which could put your confidential information at risk."

The "ourwebsite" has a valid certificate and also this problem does not arise in any new iphone/ipod touch or ipads just the oldest iphones.

This is affecting my login from working by throwing a connection error after user clicks ok to the connection error alert the login process runs through fine. But the problem is its affecting the UI after the login.

So pretty much want to know if anyone else is having issues like this with the old iphone. There is no problem with my code as it works perfectly fine on simulator & ipad/4gen ipod touch.

Thanks

like image 643
Scott Roberts Avatar asked Feb 01 '11 09:02

Scott Roberts


1 Answers

We had this error and the iPhone 3g in question had an incorrect date and time set. This meant all SSL transactions would fail.

We assumed that this iOS bug is an apple problem not ours and so hacking the SSL certificate to be ignored is not the solution!

like image 168
user363349 Avatar answered Sep 28 '22 17:09

user363349