-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Respond to IL2026 warnings in DataProtection originating from EncryptedXml #47695
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
Comments
[main] Update dependencies from dotnet/runtime - Suppress warnings in DataProtection Tracked with #47695 - Update docker image used to bulid RPM installers - add util-linux for useradd - also add shadow-utils - add awk - Add more dependencies. Remove scl enable - Add missing dependencies - Cleanup dependencies - More cleanup
Good luck :) So the defaults are AES-256-CBC and HMACSHA256 however EncryptedXml is nicely flexible, so any hmac and any symmetric key algorithm is possible. What you probably want as a starting point is anything that can be configured with the easy access settings, Which ends up being https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.dataprotection.authenticatedencryption.configurationmodel.authenticatedencryptorconfiguration?view=aspnetcore-7.0 For encryption it's only AES without a bunch of work, For validation it's only HMAC256 and HMAC512 |
Note: when doing this work, we should remove the RequiresUnreferencedCode attribute that was added to AddAuthentication() in #47663. aspnetcore/src/Security/Authentication/Core/src/AuthenticationServiceCollectionExtensions.cs Lines 20 to 21 in 5807400
|
* Add a DynamicDependency to ensure Aes decryption works in EncryptedXmlDecryptor * Suppress the warnings from EncryptedXml * Add trimming tests to ensure these scenarios work correctly. * Remove the RequiresUnreferencedCode attribute on AddAuthentication, since this is the only thing in that method that has warnings. Fix #47695 * Fix parallel build to not copy files to the same destination
With dotnet/runtime#84468,
EncryptedXml
is now marked asRequiresUnreferencedCode
. This is becauseFrom discussion in #47410 (comment), we should:
[DynamicDependency]
attributes for them.System.Security.Cryptography.Xml
The text was updated successfully, but these errors were encountered: