Commit 2c860a7
[release/9.0-staging] Ensure proper cleanup of key files when not persisting them (#109844)
* Ensure proper cleanup of key files when not persisting them
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.
* Support systems that have never had CAPI-DSS
* Review feedback
* 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
---------
Co-authored-by: Jeremy Barton <jbarton@microsoft.com>1 parent 718c531 commit 2c860a7
File tree
3 files changed
+541
-2
lines changed- src/libraries
- Common/src/Microsoft/Win32/SafeHandles
- System.Security.Cryptography/tests
- X509Certificates
3 files changed
+541
-2
lines changedLines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
53 | 59 | | |
54 | 60 | | |
55 | 61 | | |
56 | | - | |
| 62 | + | |
57 | 63 | | |
58 | 64 | | |
59 | 65 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
513 | 513 | | |
514 | 514 | | |
515 | 515 | | |
516 | | - | |
| 516 | + | |
| 517 | + | |
517 | 518 | | |
518 | 519 | | |
519 | 520 | | |
| |||
0 commit comments