-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[release/7.0] Use platform runtime check for ProtectedData #80196
[release/7.0] Use platform runtime check for ProtectedData #80196
Conversation
Tagging subscribers to this area: @dotnet/area-system-security, @vcsjones Issue DetailsBackport of #80158 to release/7.0 DescriptionReported by a customer in #78875. The System.Security.Cryptography.ProtectedData package erroneously throws a This changes the package from using target platform identifiers to using runtime checks to determine if the platform is Windows. Using target platform identifiers with .NET Standard was removed in .NET 7, so the checks are now performed at runtime. Customer ImpactCustomers are unable to use version 7.0.0 of this package on Windows in a UWP project, or other .NET platforms that are not a .NETCoreApp target. RegressionThis is a regression from the 6.0.x version of the package, which works correctly on Windows with .NET Standard. TestingManually verified the package contents and that it can be used from a UWP project. RiskUncertain. This adjusts the package's I will defer to @bartonjs and/or @ViktorHofer to provide input here. Package authoring signed off?Required. This services System.Security.Cryptography.ProtectedData. IMPORTANT: If this change touches code that ships in a NuGet package, please make certain that you have added any necessary package authoring and gotten it explicitly reviewed.
|
@bartonjs when/if this is ready, can you please add the |
Approved by Tactics (7.0.3). |
Backport of #80158 to release/7.0
Description
Reported by a customer in #78875. The System.Security.Cryptography.ProtectedData package erroneously throws a
PlatformNotSupportedException
on Windows for non .NETCoreApp targets, like UWP, which use the .NETStandard targets.This changes the package from using target platform identifiers to using runtime checks to determine if the platform is Windows. Using target platform identifiers with .NET Standard was removed in .NET 7, so the checks are now performed at runtime.
Customer Impact
Customers are unable to use version 7.0.0 of this package on Windows in a UWP project, or other .NET platforms that are not a .NETCoreApp target.
Regression
This is a regression from the 6.0.x version of the package, which works correctly on Windows with .NET Standard.
Testing
Manually verified the package contents and that it can be used from a UWP project.
Risk
Medium-low. The tests verify the code is behaving as-expected both on Windows and non-Windows systems, but the change also simplifies the target framework of the package, which may have unexpected consequences in build-over-build validation tools.
Package authoring signed off?
Required. This services System.Security.Cryptography.ProtectedData.
IMPORTANT: If this change touches code that ships in a NuGet package, please make certain that you have added any necessary package authoring and gotten it explicitly reviewed.