Skip to content

[breaking change] Change SecurityContext to an abstract final class #55786

Closed
@brianquinlan

Description

@brianquinlan

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

Metadata

Metadata

Labels

area-core-librarySDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.breaking-change-approvedbreaking-change-requestThis tracks requests for feedback on breaking changeslibrary-io

Type

No type

Projects

Status

Complete

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions