Aktiv Co. / Aleksey Samsonov: fix case depending on length.
also no need to null resplen or le (done by sc_format_apdu). git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3700 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
be526c840f
commit
265eb5923b
|
@ -446,11 +446,9 @@ static int iso7816_select_file(sc_card_t *card,
|
||||||
apdu.resp = buf;
|
apdu.resp = buf;
|
||||||
apdu.resplen = sizeof(buf);
|
apdu.resplen = sizeof(buf);
|
||||||
apdu.le = 256;
|
apdu.le = 256;
|
||||||
} else {
|
} else
|
||||||
apdu.resplen = 0;
|
apdu.cse = (apdu.lc == 0) ? SC_APDU_CASE_1 : SC_APDU_CASE_3_SHORT;
|
||||||
apdu.le = 0;
|
|
||||||
apdu.cse = SC_APDU_CASE_3_SHORT;
|
|
||||||
}
|
|
||||||
r = sc_transmit_apdu(card, &apdu);
|
r = sc_transmit_apdu(card, &apdu);
|
||||||
SC_TEST_RET(card->ctx, r, "APDU transmit failed");
|
SC_TEST_RET(card->ctx, r, "APDU transmit failed");
|
||||||
if (file_out == NULL) {
|
if (file_out == NULL) {
|
||||||
|
|
Loading…
Reference in New Issue