Re: NSURLConnection and https
Re: NSURLConnection and https
- Subject: Re: NSURLConnection and https
- From: Julio Cesar Silva dos Santos <email@hidden>
- Date: Mon, 22 Jan 2007 09:16:17 -0200
If your main class is the delegate of NSURLConnection, simply
implement connection:didFailWithError: to override the default
behaviour and present a custom dialog box.
Julio Cesar Silva dos Santos
email@hidden
email@hidden
Blogjective-C
http://www.jcs.santos.nom.br/wp
FetchYourLyrics
http://www.jcs.santos.nom.br/fyl/fyl.html
On 22/01/2007, at 08:56, Lesin, Vladislav wrote:
Hi all
I am loading links with NSURLConnection. I do this by setting up an
instance of NSURLRequest.
The problem I have occurs under the following situation:
1) The NSURL in question is "https://" (secure)
2) The cert can't be validated
What is occurring is that the NSURLConnection promptly calls its
delegate function:
connection:didFailWithError:
The NSError is filled with
Error = "bad server certificate"
Domain = NSURLErrorDomain
Code = -1203
UserInfo =
NSErrorFailingURLKey = <url>
NSErrorFailingURLStringKey = <url>
NSLocalizedDescription = "bad server certificate"
Now, what I want is a chance to present the user with "Certificate
can't be validated, do you wish to proceed?" But I have no idea how to
recover from this or intercept the cert or anything.
How to use NSURLConnection to get data from HTTPS server with a
self-signed/unknown certificate?
Thanks!
Best regards
Vlad
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden