Re: NSURLConnection Certificate Problem
Re: NSURLConnection Certificate Problem
- Subject: Re: NSURLConnection Certificate Problem
- From: Stefan Pantke <email@hidden>
- Date: Wed, 19 Jan 2005 21:08:20 +0100
Am 19. Jan 2005 um 20:45 schrieb Jay Koutavas:
I'm trying to use NSURLConnection to POST a request to an https://-based web page. I get the following error from my NSURLConnection didFailWithError: handler:
<x-tad-bigger>005-01-19 13:40:18.215 fooApp[13519] got connection error [NSError "bad server certificate" Domain=NSURLErrorDomain Code=-1203 UserInfo</x-tad-bigger><x-tad-bigger>?</x-tad-bigger><x-tad-bigger>={
NSErrorFailingURLKey</x-tad-bigger><x-tad-bigger>?</x-tad-bigger><x-tad-bigger> = https://foo.net/foopage;
NSErrorFailingURLStringKey</x-tad-bigger><x-tad-bigger>?</x-tad-bigger><x-tad-bigger> = "https://foo.net/foopage";
NSLocalizedDescription</x-tad-bigger><x-tad-bigger>?</x-tad-bigger><x-tad-bigger> = "bad server certificate";
</x-tad-bigger>When I try to open the https:// address from Safari, I get an alert worded:
Safari can't verify the identity of the website "foo.net".
The certificate for this website was signed by an unknown certifying authority. You might be connecting to a websire that is pretending to be "foo.net" which could put your confidential information at risk. Would you like to connect to the website anyway?" <Cancel> <Continue>
(clearly "foo.net" is a made-up name)
Hitting the Continue button then allows the page to load. Doing this does not however clear the error that my app is getting.
WebKit is based on callbacks, which are triggered in diverse situations.
Bad certificates is one example.
WebKit tries to connect to your site, which send a certificate to your application.
If this SSL certificate isn't created by a WebKit/Safari know certification authority like
Thawte e.g., WebKit issues a message. You then have a chance to check the bad
certificate.
Why? Because certifcates from certification authorities are assumes to be authentic ;-)
Your self-sing certificate is certainly technically speaking legal, but it might be corrupted -
some illegal authority or a man in the middle might have changed it.
CU, s
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden