[Pcsclite-muscle] Missing checks of ATRDecodeAtr returns
Sebastien Lorquet
sebastien at lorquet.fr
Fri Aug 14 04:39:19 EDT 2020
Hello,
Le 08/08/2020 à 15:22, Ludovic Rousseau a écrit :
> I don't think a "normal" smart card reader would ever report an ATR of
> 0 or 1 byte.
It is not possible for a normal smart card.
The ATR is at least one byte since TS (interface byte, 3B or 3F) is
mandatory within the usual reset delay , else the card is considered
"mute at reset".
So the length of the ATR is at least one.
Moreover, the following T0 byte is also mandatory. it encodes the
presence of TA1..TD1 and the length of historical bytes.
Without any T bytes and zero historicals, the shortest valid ATR of the
world is 3B00 (or 3F00 in inverse convention - very unusual these days).
So an ATR shorter than 2 bytes should be reported as a mute card, for
example.
Sebastien
More information about the pcsclite-muscle
mailing list