Change Intent
The intent is to change the dart:io SecurityContext class, used to control the security aspects of a socket connection, from an interface class to an abstract final class.
Justification
A user-implemented SecurityContext cannot be used in place of the dart:io implementation because the Dart TLS implementation depends on C++ data structures found only in its implementation.
Making SecurityContext final also makes it easier for the Dart team to modify in the future e.g. #55679
Impact
This change will break anyone who implements SecurityContext. On GitHub, I only found two such instances, and both were in tests that just raise if a SecurityContext method is called e.g. https://github.com/platform-platform/universal_io/blob/37e2dfcae32156b28477365e9dcf357d583098e5/packages/universal_io/lib/src/driver/driver_impl_vm.dart#L499
Mitigation
Developers must modify (or remove) all classes that implement SecurityContext.
Change Timeline
Remove in Dart 3.5
Associated CLs
No response
Change Intent
The intent is to change the
dart:ioSecurityContextclass, used to control the security aspects of a socket connection, from aninterface classto anabstract final class.Justification
A user-implemented
SecurityContextcannot be used in place of thedart:ioimplementation because the Dart TLS implementation depends on C++ data structures found only in its implementation.Making
SecurityContextfinalalso makes it easier for the Dart team to modify in the future e.g. #55679Impact
This change will break anyone who
implements SecurityContext. On GitHub, I only found two such instances, and both were in tests that just raise if aSecurityContextmethod is called e.g. https://github.com/platform-platform/universal_io/blob/37e2dfcae32156b28477365e9dcf357d583098e5/packages/universal_io/lib/src/driver/driver_impl_vm.dart#L499Mitigation
Developers must modify (or remove) all classes that
implement SecurityContext.Change Timeline
Remove in Dart 3.5
Associated CLs
No response