• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSURLConnection Certificate Problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSURLConnection Certificate Problem


  • Subject: Re: NSURLConnection Certificate Problem
  • From: Jay Koutavas <email@hidden>
  • Date: Wed, 19 Jan 2005 15:24:17 -0500

Title: Re: NSURLConnection Certificate Problem
At 9:08 PM +0100 on 1/19/05, Stefan Pantke wrote:

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:

005-01-19 13:40:18.215 fooApp[13519] got connection error [NSError "bad server certificate" Domain=NSURLErrorDomain Code=-1203 UserInfo?={
   NSErrorFailingURLKey? = https://foo.net/foopage;
   NSErrorFailingURLStringKey? = "https://foo.net/foopage";
   NSLocalizedDescription? = "bad server certificate";

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.

I understand this. My question is "how do I check it? And how do I tell webkit -- "it's okay, continue", (even if it is suspect) -- basically doing the resulting action(s) that the "Continue" button in Safari does, in my own code.

--
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  Jay Koutavas                         mailto:email@hidden    
  Heynow Software                      http://www.heynow.com
  Windham, New Hampshire, USA
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: NSURLConnection Certificate Problem
  • Next by Date: Re: Anyone got SSL over NSStreams to work?
  • Previous by thread: NSURLConnection Certificate Problem
  • Next by thread: kCFStreamErrorHTTPParseFailure?
  • Index(es):
    • Date
    • Thread