forked from dotnet/runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ignore the private key handle cert property for persisted keys
When a CERT_CONTEXT value has both property 2 (prov info) and property 78 (ncrypt key handle), prefer to load based on the property 2 state. This avoids a scenario where calling Get[Algorithm]PrivateKey sets the 'CLR IsEphemeral' property on a persisted key, preventing future loads of that key. An alternative approach of preferring the loaded key over the cold-load was not selected to avoid value contamination of ephemeral properties set on the CngKey object directly after the caller calls Get[Algorithm]PrivateKey.
- Loading branch information
Showing
2 changed files
with
128 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters