forked from OpenSC/OpenSC
-
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.
minidriver.c - Create shadow MD_ROLE_USER_ALWAYS and MD_ROLE_USER_SI…
…GN_ALWAYS PKCS11 defines CKA_ALWAYS_AUTHENTICATE attribute for private keys, which is converted to `user_consent` for PKCS15 for private keys. Windows has `PinCacheAlwaysPrompt` on PINS to accomplish the same thing - prompt user before using a key. But a key "is secured by" only one pin, but a pin may secure multiple keys where only a subset of keys need `PinCacheAlwaysPrompt` Two new pin roles are defined and use a sc_pkcs15_id auth_id of auth_id_md_role_user_always = {"MD_ROLE_USER_ALWAYS", 18}; and auth_id_md_role_user_sign_always = {"MD_ROLE_USER_SIGN_ALWAYS", 18}; When building containers for pkcs15 key objects, if user_consent > 0, the auth_id is set to one of the above. Thus when Windows CSP selects a key, it will find a pin that matches the correct role for the key. On branch minidriver-PinCacheAlwaysPrompt Changes to be committed: modified: minidriver/minidriver.c
- Loading branch information
Showing
1 changed file
with
82 additions
and
20 deletions.
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