Dependent Origination

in-app mobile safari silently fails when getting an invalid https certificate

Posted on: December 15, 2011

This marathon push is finally over — took me nearly three days. The most exasperating part? Mobile Safari silently fails, without a trace, when getting an invalid SSL certificate. Well, not when you open the browser on the phone. But when your app is making a ajax call. In the browser, it actually prompts you about the invalid/expired certificate and you have a choice to say continue and it will remember the choice for all subsequent calls. Not happening for the app.

Since we haven’t touched the mobile code for half a year and meanwhile the shared codebase and the production environment (apache configs etc) have changed so much, it took me a while to feel oriented and a whole other while to pinpoint the problem to the https certificate. In the end, the ajax call never reaches the server because the server is handing out a certificate the app (mobile browser) does not like.

Why did it work before? So back in the summer, the site was running http but only requiring https for signing in/up. But over the time, we moved the entire site under https for security concerns (mostly for making our lives easier, not need to do lots of gimmicks for potentially lethal but may never come security holes). The mobile site is hosted on the same server as the web. One physical server apparently can only have one ssl host so when we push this time, with an existing ssl host, the calls to the other host with https is giving out an invalid certificate (i suppose, this is speculation since i don’t know the exact reason why an ajax call would not reach the server and would not return, basically just do nothing).

I mean, mobile safari (in iphone app), cannot you say something when you get a certificate you don’t like???

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

December 2011
M T W T F S S
« Nov   Jan »
 1234
567891011
12131415161718
19202122232425
262728293031  

Twitter

  • is emptying trash and happily discovering the available disk space now ranks at 100G+. 2 days ago
  • is looking at other people's intentions, not their capabilities, and feeling much happier every day :) 11 months ago
  • is planning on how to spend the next two weeks until the new year, at home. 11 months ago
  • is going to have human company for Thanksgiving; a rare event for the past like twenty years. 1 year ago
  • living by myself again; a strange feeling in a bustling city with thirteen million people 1 year ago

Flickr Photos

IMG_3517

IMG_3515

IMG_3505

IMG_3497

IMG_3261

IMG_3260

IMG_3255

IMG_2736

IMG_2733

IMG_2629

More Photos
%d bloggers like this: