Re: NSURLConnection SSL connection with expired cert.
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