I am trying to validate a servers certificate in an iOS application.

The delegate method I am having an issue with is:

- (void)connection:(NSURLConnection *)connection willSendRequestForAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge

This method is called when I use a server such as "https://twitter.com".

But, when I point it to my production server (Government CA), this method simply does not get called.

This cert, I guess, can be considered a self-signed cert, because if you do not have the gov certs installed, you get the "This connection is untrusted" message in a browser.

Is there any way to force willSendRequestForAuthenticationChallenge to be called and check the self-signed certificate?

Thanks!

Edit
Report