• 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 SSL connection with expired cert.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSURLConnection SSL connection with expired cert.


  • Subject: Re: NSURLConnection SSL connection with expired cert.
  • From: Marcel Borsten <email@hidden>
  • Date: Tue, 4 Mar 2008 07:13:41 +0100

I don't think this is in any way documented and can break at any time, but after looking around for a while I found this method:

@interface NSURLRequest (NSHTTPURLRequest)
+ (BOOL)allowsAnyHTTPSCertificateForHost:(id)fp8;
+ (void)setAllowsAnyHTTPSCertificate:(BOOL)fp8 forHost:(id)fp12;

@end


@implementation NSURLRequest(NSHTTPURLRequest)

+ (BOOL)allowsAnyHTTPSCertificateForHost:(NSString *)host
{
	return YES;
}

@end

On 3 mrt 2008, at 22:08, Dave Hersey wrote:

Is there a way to get NSURLConnection to connect to an SSL server that has an expired certificate? I'm looking for a way to warn the user about the certificate and then allow them to connect anyway if they wanted, similar to how web browsers behave. It appears that I only find out about the certificate once the connection has failed (and been shutdown) with connection:didFailWithError.

If this can't be handled by NSURLConnection, is there a way to do it with CFNetwork?

Thanks,

- d

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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


  • Follow-Ups:
    • Re: NSURLConnection SSL connection with expired cert.
      • From: Jens Alfke <email@hidden>
References: 
 >NSURLConnection SSL connection with expired cert. (From: Dave Hersey <email@hidden>)

  • Prev by Date: [SOLVED] Re: Getting the "iCal" window style?
  • Next by Date: Any Seattle-area Cocoa developer groups?
  • Previous by thread: Re: NSURLConnection SSL connection with expired cert.
  • Next by thread: Re: NSURLConnection SSL connection with expired cert.
  • Index(es):
    • Date
    • Thread