Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Invalid SSL Certificate error on iPod Touch - works for iPhone

We are developing an iOS Application that connects to a server over https using nsurlconnection sendsynchronousrequest

We are getting the following error in the iPod Touch 3.2. However, the exact same code does not give any error on iPhone 3.1 Error message: The certificate for this server is invalid. You might be connecting to a server that is pretending to be “xx.xx.xxx.xxx” which could put your confidential information at risk

We are trying to connect to a server https: subdomain.domain.com and the certificate actually belongs only to https: domain.com Could that be the reason of the above inconsistency? Any idea why it works on iPhone and not on the iPod Touch. The certificate is signed by GoDaddy. Could it be that the iPod Touch does not have GoDaddy's root certificate?

We need to find a way around this problem without preferably using private APIs. Any help will be appreciated. Thanks.

like image 710
Ashutosh Sovani Avatar asked Feb 25 '23 18:02

Ashutosh Sovani


1 Answers

We had almost this exact problem: A certificate error on a particular device running the same code that worked on multiple other devices. It turned out that this had to do with the internal date of the problem device not being current. Our SSL certificate was up to date, but the device was set outside the valid date range. It's worth checking because it could happen to anyone - even the iTunes app reviewer rejected the app for this reason. Luckily we were familiar with the issue, appealed and got a quick approval.

like image 80
owise1 Avatar answered Mar 15 '23 15:03

owise1