Skip to content

Commit

Permalink
Add multiple PINs support to minidriver
Browse files Browse the repository at this point in the history
Many cards need multiple PINs to work correctly since different on-card
keys are secured by different PINs (this is true for for example OpenPGP
card).

Smart Card Minidriver API has supported such cards since version 6.02
(Vista+).

Use the same method as PKCS#11 driver does to discover user and sign PINs,
for consistency.
However, if there is a default container on card we'll make sure that its
PIN is an user PIN and if there is no default container we'll mark the one
with the user PIN as default.

All other PINs securing containers on card are added as next PINs, up to
MD_MAX_PINS.

Use this opportunity to also fix two cases where a pointer-to-DWORD
variable was passed as pointer-to-size_t parameter to
md_dialog_perform_pin_operation() - they are of different size on Win64.

Signed-off-by: Maciej S. Szmigiero <[email protected]>
  • Loading branch information
maciejsszmigiero authored and frankmorgner committed Oct 16, 2017
1 parent a8126ad commit bd9cdd2
Show file tree
Hide file tree
Showing 2 changed files with 480 additions and 164 deletions.
Loading

0 comments on commit bd9cdd2

Please sign in to comment.