in case of T0 the Le value is omitted for case 4 APDUs; patch supplied by richard.musil@bigfoot.com
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2397 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
eddd1e3ab6
commit
b9cf818d56
|
@ -180,10 +180,13 @@ static int sc_transceive(sc_card_t *card, sc_apdu_t *apdu)
|
|||
return SC_ERROR_INVALID_ARGUMENTS;
|
||||
memcpy(data, apdu->data, data_bytes);
|
||||
data += data_bytes;
|
||||
/* in case of T0 the Le value is omitted */
|
||||
if (card->slot->active_protocol == SC_PROTO_T1) {
|
||||
if (apdu->le == 256)
|
||||
*data++ = 0x00;
|
||||
else
|
||||
*data++ = (u8) apdu->le;
|
||||
}
|
||||
break;
|
||||
}
|
||||
sendsize = data - sbuf;
|
||||
|
|
Loading…
Reference in New Issue