Tuesday, 15 February 2011

iphone - willSendRequestForAuthenticationChallenge not called -


I am trying to validate the server certificate in an iOS application. There is a problem with

:

  - (zero) connection: (NSURLConnection *) connection will be the Sandroquestfertification challenge: (NSURLAuthenticationChallenge *) challenge   

When I put this method on

However, when I put it on my production server (Government Ca), this method does not just call.

This proof, I suppose, can be considered as a self-signed certificate, because if you do not have GOV serials installed, you receive the message "This Connection Unreliable" in the browser.

What is the ISENDRequestForAuthenticationChallenge called for enforcement of force in any way and can check self-signed certificates?

Thank you!

The question was asked some time ago, but I thought I would give an answer for people to come Would like to

As I unders the challenge of the sleepiness certification, only every 10 minutes per host is called accordingly. The result of the challenge is being cached for the performance. Cash expires in 10 minutes ()

Good insight is given here by jblack , which is a reference to the Apple forum:

When I had a similar question and a problem, the thing that slipped me was that I had used the same host for many operations in the app, so the challenge has been accepted elsewhere, but my Exclude from NSURL connection Halley has not expired, so I never got a challenge (no need).

Try to separate this request to the host and then you should get a callback.

Hope this will be helpful.

No comments:

Post a Comment