dart-lang / sdk

The Dart SDK, including the VM, JS and Wasm compilers, analysis, core libraries, and more.
https://dart.dev
BSD 3-Clause "New" or "Revised" License
10.25k stars 1.58k forks source link

Feature Request: set security protocol used by dart http client for https connections #46083

Open proneotiv opened 3 years ago

proneotiv commented 3 years ago

In my company, we are creating a medical device (app) with dart (flutter) and we are required by law, to specifically allow only one certain type of security protocol (in out case TLS 1.2). When any other type of security protocol is used (e.g. TLS 1.3) connections should be declined by the client.

Wha this feature request desires:

I used this feature before in mobile app created with unity and C#. In C#, there is a class called ServicePointManager where you can sepcify a specific security protocol via an SecurityProtocolType enum. Maybe there is a way to do something similar with dart (See C# references below).

I have not yet found a way to do this wit dart, that is why I created this feature request. According to this issue, it is not supported by the dart language at the moment: https://github.com/dart-lang/sdk/issues/37173

We are currently using flutter version 1.22.6 with dart sdk version 2.10.5 but will be upgrading to flutter 2.0+ soon. As flutter uses the dart http client, I understand this issue to be a dart lang issue and not a flutter issue.

As mobile developers we are developing on Mac and Windows for Android and iOS.

Thank you in advance for your help!

centerboy88 commented 3 years ago

we need that exact the same way - good approach

centerboy88 commented 2 years ago

any news on this feature request ?