Skip navigation.
 
mlRe: NSURLConnection SSL connection with expired cert.
FROM : Marcel Borsten
DATE : Tue Mar 04 07:13:41 2008

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_removed>)
>
> 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:
> http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>
> This email sent to <email_removed>
>

Related mailsAuthorDate
mlNSURLConnection SSL connection with expired cert. Dave Hersey Mar 3, 22:08
mlRe: NSURLConnection SSL connection with expired cert. Jens Alfke Mar 3, 23:14
mlRe: NSURLConnection SSL connection with expired cert. Nick Zitzmann Mar 3, 23:47
mlRe: NSURLConnection SSL connection with expired cert. Marcel Borsten Mar 4, 07:13
mlRe: NSURLConnection SSL connection with expired cert. Jens Alfke Mar 4, 17:11