API to limit the set of TLS Cipher Suites supported by client

Hello,

I run into at least a couple of posts (here and here) that appear to have a very similar if not the same question, both aswered by Eskimo. I saw his observations about why it makes sense to configure the specific set of ciphers to be configured in the server and I agree with the observation when the server is totally in your control.

We have a business/security requirement to in addition of the server, also limit the TLS session to only support a specific subset of cipher suites. I think the case in mind is that our app may be configured to connect to server endpoints where we are not necessarily in control of, and to minimize security gaps, we would like to also from the client side support only a specific subset of suites.

Our networking layer uses NSURLSession as we know that's the general recommendation, if this API does not support it, what are our options to be able to comply with our requirement?

I found a lower-level API Secure Transport framework that has some functions to retrieve/set cipher suites, but it seems these APIs are mostly deprecated now. This documentation refers us to use the newer Network framework instead, I noticed some TLS related APIs, such as TLS Options, but nothing specific for ciphers.

Any advice?

Our networking layer uses NSURLSession as we know that's the general
recommendation, if this API does not support it, what are our options
to be able to comply with our requirement?

Nothing good. You can drop down to a lower level but then you have to re-implement HTTP, which is likely to generate more bugs, including security bugs, than you solve by this change.

Regardless, if you’re working at the NWConnection level the TLS controls are found in <Security/SecProtocolOptions.h>. I’m not sure if there’s a way to do what you want but there’s plenty to explore.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"
Thanks Eskimo! I really like the level of abstraction that NSURLSession offers but at the same time I would love a bit more flexibility to customize the these kinds of parameters (while making sure the level of security is not decreased) vs having to re-implement HTTP.

I would love a bit more flexibility to customize the these kinds of
parameters

Quite. I encourage you to file an enhancement request describing your requirements.

Please post your bug number, just for the record.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"
API to limit the set of TLS Cipher Suites supported by client
 
 
Q