-
Notifications
You must be signed in to change notification settings - Fork 5k
Merge System.Security.Cryptography.Algorithms to System.Security.Cryptography #61543
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
Conversation
Note regarding the This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change. |
Tagging subscribers to this area: @bartonjs, @vcsjones, @krwq, @GrabYourPitchforks Issue Details
This move resulted in a net reduction of about 25 resource strings from a combination of the string already being present in the unified library, perhaps some strings that already had no references, and a few strings got abandoned (unified onto another existing string). Three notable changes exist in the resource string moves:
The "Unix" files were generally renamed to "OpenSsl" in this change. The Android build still uses many of those files, copying them to an Android specific version is being left to a followup change. The crypto tests definitely look a bit untidy at this point. The static classes and
|
ffd8923
to
abb6791
Compare
@safern for the structural/infra changes, please @GrabYourPitchforks / @stephentoub for the impact of bringing browser fully into the fold here. Specifically the second commit (440df74) (yeah, it'll all get squashed in the end) |
@@ -1,7 +1,9 @@ | |||
<Project Sdk="Microsoft.NET.Sdk"> | |||
<PropertyGroup> | |||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> | |||
<DefineConstants>$(DefineConstants);INTERNAL_ASYMMETRIC_IMPLEMENTATIONS</DefineConstants> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we are merging pretty much all of Crypto into one assembly, is this still needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's still needed in this iteration, yeah. It'll go away between this one and the next. (That is, before the next library merges in; or as part of that)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Infra changes look good. However CI is red due to some of these.
Yeah. I was verifying that I'd fixed them all today when the power went out. Sorta... slowed things down. |
fc7cf75
to
c48fea3
Compare
Re: browser impact, I suspect we'd want to add an ILLink.Substitutions.xml file so that patterns like With that substitution file in place, I'd assume no measurable impact to non-browser platforms? |
@@ -556,6 +580,12 @@ private static CryptographicException AlgorithmKdfRequiresChars(string algId) | |||
{ | |||
string? algId = encryptionScheme.Algorithm; | |||
|
|||
if (!Helpers.HasSymmetricEncryption) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This (+ HasHMAC
below) are becoming something of a common pattern. Would it make sense to refactor the "check + throw an appropriate exception" logic into its own helper method?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
M...aybe? They're here because of the UnsupportedOS flow analyzer, to show it that there's no way for Browser to make it to the annotated-as-failing Creates. I don't know how much flexibility we have with what it understands.
Well, except we're going to try getting them enabled this release. So these helpers will probably drop out :) |
This assembly has been removed with dotnet/runtime#61543
[main] Update dependencies from dotnet/runtime - Merge branch 'main' of https://github.com/dotnet/sdk into darc-main-79a18e20-75f6-4bb7-8d8e-5ae13e5c66b0 - Update baselines to remove Cryptography.Algorithms. This assembly has been removed with dotnet/runtime#61543 - More baseline updates
This move resulted in a net reduction of about 25 resource strings from a combination of the string already being present in the unified library, perhaps some strings that already had no references, and a few strings got abandoned (unified onto another existing string).
Three notable changes exist in the resource string moves:
The "Unix" files were generally renamed to "OpenSsl" in this change. The Android build still uses many of those files, copying them to an Android specific version is being left to a followup change.
The crypto tests definitely look a bit untidy at this point. The static classes and
[Algorithm]Provider
model will have to be redone before the Cng/Csp/OpenSsl libraries can be merged in. Since this change is largely about library consolidation, no test cleanup was done with this change.