Skip to content

Commit 02c8b44

Browse files
committed
minidriver.c - pass auth-method SC_AC_CONTEXT_SPECIFIC for pin always
framework-pkcs15.c passes specific auth_method as SC_AC_CONTEXT_SPECIFIC and minidriveralso does for sessions pins. They may not work together. Changes to be committed: modified: minidriver/minidriver.c
1 parent 7a8020d commit 02c8b44

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/minidriver/minidriver.c

+9
Original file line numberDiff line numberDiff line change
@@ -6008,6 +6008,15 @@ DWORD WINAPI CardAuthenticateEx(__in PCARD_DATA pCardData,
60086008
if (pcbSessionPin) *pcbSessionPin = 0;
60096009
if (ppbSessionPin) *ppbSessionPin = NULL;
60106010
logprintf(pCardData, 2, "standard pin verification");
6011+
/*
6012+
* TODO the use of auth_method being overridden to do session pin
6013+
* conflicts with framework-pkcs15.c use of auth_method SC_AC_CONTEXT_SPECIFIC
6014+
* for a different porpose. But needs to be reviewed
6015+
*/
6016+
if (PinId == MD_ROLE_USER_SIGN && vs->need_pin_always) {
6017+
auth_info->auth_method = SC_AC_CONTEXT_SPECIFIC;
6018+
logprintf(pCardData, 7, "Setting SC_AC_CONTEXT_SPECIFIC\n");
6019+
}
60116020
r = md_dialog_perform_pin_operation(pCardData, SC_PIN_CMD_VERIFY, vs->p15card, pin_obj, (const u8 *) pbPinData, cbPinData, NULL, NULL, DisplayPinpadUI, PinId);
60126021
}
60136022

0 commit comments

Comments
 (0)