Re: SSL certificate validation
Re: SSL certificate validation
- Subject: Re: SSL certificate validation
- From: Jens Alfke <email@hidden>
- Date: Fri, 6 Mar 2009 12:34:48 -0800
On Mar 6, 2009, at 2:11 AM, SridharRao M wrote: I need to connect to a a service that uses certificate based authentication over SSL. My client provided a certificate that i need to validate with the server certificate. I found a method "+ (BOOL)allowsAnyHTTPSCertificateForHost:(NSString*)host;" for NSURLRequest to ignore ssl certificate errors. But i can't find any method to validate My certificate .
I don't think you can do this with NSURLConnection, unfortunately.
If you drop down to CFStream, there are SSL-related properties you can set. The one you want, I think, is kCFStreamSSLCertificates. The value should be an array of SecIdentityRef. (You probably just need one item.)
—Jens
PS: You can find some of my code that uses this stuff here: |
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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