-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Ensure proper cleanup of key files when not persisting them #109731
Conversation
Code inspection suggested that keys imported into the CNG MachineKey store from PFXImportCertStore were not getting properly cleaned up. This change adds tests that prove that supposition, and then fixes the bug so they pass.
Tagging subscribers to this area: @dotnet/area-system-security, @bartonjs, @vcsjones |
...libraries/System.Security.Cryptography/tests/X509Certificates/X509FilesystemTests.Windows.cs
Outdated
Show resolved
Hide resolved
...libraries/System.Security.Cryptography/tests/X509Certificates/X509FilesystemTests.Windows.cs
Outdated
Show resolved
Hide resolved
...libraries/System.Security.Cryptography/tests/X509Certificates/X509FilesystemTests.Windows.cs
Outdated
Show resolved
Hide resolved
...libraries/System.Security.Cryptography/tests/X509Certificates/X509FilesystemTests.Windows.cs
Outdated
Show resolved
Hide resolved
...libraries/System.Security.Cryptography/tests/X509Certificates/X509FilesystemTests.Windows.cs
Outdated
Show resolved
Hide resolved
...libraries/System.Security.Cryptography/tests/X509Certificates/X509FilesystemTests.Windows.cs
Show resolved
Hide resolved
* Bump keysize to 2048 * This caused the tests to be too slow, so reuse 6 random keys for all of them * Remove the random ordering in machine-or-user for defaultkeyset (try both ways) * Remove incorrect copy/paste comment * Remove bad nullable annotation
/backport to release/9.0-staging |
Started backporting to release/9.0-staging: https://github.com/dotnet/runtime/actions/runs/11844527380 |
/backport to release/8.0-staging |
Started backporting to release/8.0-staging: https://github.com/dotnet/runtime/actions/runs/11844532108 |
Code inspection suggested that keys imported into the CNG MachineKey store from PFXImportCertStore were not getting properly cleaned up. This change adds tests that prove that supposition, and then fixes the bug so they pass.