ruToken: in non-extended APDUs the 'Le' value cannot be more then 256 bytes ...

in r5186 the SC_MAX_APDU_BUFFER_SIZE has been increased
and so the previous defintion of Le value became invalid.



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5225 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
vtarasov 2011-03-11 17:57:46 +00:00
parent 10e5a18ec9
commit d7c0ad71ff
1 changed files with 3 additions and 3 deletions

View File

@ -249,7 +249,7 @@ static int rutoken_list_files(sc_card_t *card, u8 *buf, size_t buflen)
{
apdu.resp = rbuf;
apdu.resplen = sizeof(rbuf);
apdu.le = sizeof(rbuf) - 2;
apdu.le = 256;
ret = sc_transmit_apdu(card, &apdu);
SC_TEST_RET(card->ctx, SC_LOG_DEBUG_NORMAL, ret, "APDU transmit failed");
if (apdu.sw1 == 0x6A && apdu.sw2 == 0x82)
@ -284,7 +284,7 @@ static int rutoken_list_files(sc_card_t *card, u8 *buf, size_t buflen)
sc_format_apdu(card, &apdu, SC_APDU_CASE_2_SHORT, 0xA4, 0x03, 0);
apdu.resp = rbuf;
apdu.resplen = sizeof(rbuf);
apdu.le = sizeof(rbuf) - 2;
apdu.le = 256;
ret = sc_transmit_apdu(card, &apdu);
SC_TEST_RET(card->ctx, SC_LOG_DEBUG_NORMAL, ret, "APDU transmit failed");
ret = sc_check_sw(card, apdu.sw1, apdu.sw2);
@ -398,7 +398,7 @@ static int rutoken_select_file(sc_card_t *card,
apdu.resp = buf;
apdu.resplen = sizeof(buf);
apdu.le = sizeof(buf) - 2;
apdu.le = 256;
ret = sc_transmit_apdu(card, &apdu);
SC_TEST_RET(card->ctx, SC_LOG_DEBUG_NORMAL, ret, "APDU transmit failed");