IASECC/CPX: SC_PATH_TYPE_FILE_ID, wrong APDU
For SC_PATH_TYPE_FILE_ID, P2 should be 0x04, if not, then we get the following errors: [opensc-pkcs11] reader-pcsc.c:324:pcsc_transmit: Outgoing APDU (7 bytes): 00 A4 02 00 02 A0 01 ....... [opensc-pkcs11] reader-pcsc.c:242:pcsc_internal_transmit: called [opensc-pkcs11] reader-pcsc.c:333:pcsc_transmit: Incoming APDU (2 bytes): 6A 86 j. [opensc-pkcs11] apdu.c:382:sc_single_transmit: returning with: 0 (Success) [opensc-pkcs11] apdu.c:535:sc_transmit: returning with: 0 (Success) [opensc-pkcs11] card.c:523:sc_unlock: called [opensc-pkcs11] iso7816.c:128:iso7816_check_sw: Incorrect parameters P1-P2 [opensc-pkcs11] card-iasecc.c:1107:iasecc_select_file: iasecc_select_file() check SW failed: -1205 (Incorrect parameters in APDU) [opensc-pkcs11] card.c:866:sc_select_file: 'SELECT' error: -1205 (Incorrect parameters in APDU) when running: ./pkcs11-tool --test --login --pin abcd
This commit is contained in:
parent
c581d1b26f
commit
20f359ea04
|
@ -1003,7 +1003,10 @@ iasecc_select_file(struct sc_card *card, const struct sc_path *path,
|
|||
if (card->type == SC_CARD_TYPE_IASECC_OBERTHUR ||
|
||||
card->type == SC_CARD_TYPE_IASECC_AMOS ||
|
||||
card->type == SC_CARD_TYPE_IASECC_MI ||
|
||||
card->type == SC_CARD_TYPE_IASECC_MI2) {
|
||||
card->type == SC_CARD_TYPE_IASECC_MI2 ||
|
||||
card->type == SC_CARD_TYPE_IASECC_CPX ||
|
||||
card->type == SC_CARD_TYPE_IASECC_CPXCL
|
||||
) {
|
||||
apdu.p2 = 0x04;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue