Add criteria to check if card capability SC_CARD_CAP_PROTECTED_AUTHENTICATION_PATH is available
The code segment checks the response to determine if the SC_CARD_CAP_PROTECTED_AUTHENTICATION_PATH is available. From the APDU manual of the sc-hsm, there's one status word: SC_ERROR_REF_DATA_NOT_USABLE(0x6984) that should also be taken into account.
This commit is contained in:
parent
83162c5c87
commit
c3c5f2d518
|
@ -1026,7 +1026,7 @@ static int sc_pkcs15emu_sc_hsm_init (sc_pkcs15_card_t * p15card)
|
|||
r = sc_pin_cmd(card, &pindata, NULL);
|
||||
}
|
||||
|
||||
if ((r != SC_ERROR_DATA_OBJECT_NOT_FOUND) && (r != SC_ERROR_INCORRECT_PARAMETERS))
|
||||
if ((r != SC_ERROR_DATA_OBJECT_NOT_FOUND) && (r != SC_ERROR_INCORRECT_PARAMETERS) && (r != SC_ERROR_REF_DATA_NOT_USABLE))
|
||||
card->caps |= SC_CARD_CAP_PROTECTED_AUTHENTICATION_PATH;
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue