Re: Configure socket used by NSURLConnection?
Re: Configure socket used by NSURLConnection?
- Subject: Re: Configure socket used by NSURLConnection?
- From: "Quinn \"The Eskimo!\"" <email@hidden>
- Date: Wed, 30 Jul 2014 10:33:18 +0100
On 29 Jul 2014, at 19:46, Jeffrey Walton <email@hidden> wrote:
> Its too bad the high level objects like NSURLConnection don't take a CFSocketStream. I'm kinda lazy, and I like using NSURLConnection and friends. Not taking it creates a lot of work for me unless I look into re-using some OpenSSL code.
You could use an NSURLProtocol to trap all your HTTPS requests and then issue them using your own HTTP engine. This would allow you to keep using NSURL{Session,Connection} in your app while fixing the underlying problem. However, that doesn't get you past the requirement that you have to implement your own HTTP engine, which is not fun.
For an example of using an NSURLProtocol, check out the CustomHTTPProtocol sample code. Note that this sample uses a recursive NSURLConnection request in place of its own HTTPS engine, so it won't help with that part of things.
<https://developer.apple.com/library/ios/#samplecode/CustomHTTPProtocol/>
You should definitely file a bug against NSURLSession asking for more control over how it sets up the Secure Transport context.
<https://developer.apple.com/bug-reporting/>
Please post your bug number, just for the record.
Finally, there's always the option of fixing this an the server side. If you have control oven the server, you can configure it to choose the cypher suite you want.
> Yeah, you and Jens are not going to get an invitation to barbecue at my place :)
)-;
Share and Enjoy
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
_______________________________________________
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