Skip to content

Commit

Permalink
minidriver.c pkcs15-piv.c
Browse files Browse the repository at this point in the history
Log  PinCacheAlwaysPrompt is set

Correct setting pin preference for user and sign key when used
by minidriver.
  • Loading branch information
dengert committed Jun 1, 2024
1 parent 5f53011 commit 3e994cc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/libopensc/pkcs15-piv.c
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,7 @@ static int sc_pkcs15emu_piv_init(sc_pkcs15_card_t *p15card)
sc_format_path(pins[i].path, &pin_info.path);

label = pins[i].label;
if ((i == 0 || i == 3) &&
if ((i == 0 || i == 2) &&
sc_card_ctl(card, SC_CARDCTL_PIV_PIN_PREFERENCE,
&pin_ref) == 0 &&
pin_ref == 0x00) { /* must be 80 for PIV pin, or 00 for Global PIN */
Expand Down
1 change: 1 addition & 0 deletions src/minidriver/minidriver.c
Original file line number Diff line number Diff line change
Expand Up @@ -6480,6 +6480,7 @@ DWORD WINAPI CardGetProperty(__in PCARD_DATA pCardData,
else if (dwFlags == MD_ROLE_USER_SIGN) {
p->PinPurpose = DigitalSignaturePin;
/* may need to check pin auto_info for auth_method SC_AC_CONTEXT_SPECIFIC */
logprintf(pCardData, 1, "seting PinCacheAlwaysPrompt\n");

Check failure on line 6483 in src/minidriver/minidriver.c

View workflow job for this annotation

GitHub Actions / Check for spelling errors

seting ==> setting
p->PinCachePolicy.PinCachePolicyType = PinCacheAlwaysPrompt;
}
else
Expand Down

0 comments on commit 3e994cc

Please sign in to comment.