Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email email@example.com
From: Martin Paljak (martinpaljak.pri.ee)
Date: Thu Nov 04 2010 - 09:33:41 CDT
The Estonian ID card has historically had two ATR-s, a warm and a cold. There are several incarnations of the cards where the command interface should be "similar" to the original Micardo card but is not always the case.
There are several cards:
Micardo based with a cold ATR   and a warm ATR  . Notice that cold ATR-s specify both T=1 and T=0 but warm ATR-s don't (which will mean T=0)
Another incarnation of the card should mimic the Micardo card, but actually doesn't. It incorrectly copies the ATR of one of the earlier cards, but in a reverse order: the shorter style ATR  which other cards use for a warm ATR
is now used for the cold ATR and the longer cold ATR  of a previous card used for the warm ATR.
Some versions of pcsc-lite in the 1.5.x range don't correctly handle such situation and truncate the longer warm ATR to the length of the cold ATR (which did not pop up with earlier cards).
This has been fixed in the 1.6.x version, so people who can upgrade should do it ASAP :)
pcsc-lite tries to use T=1 by default, which will cause troubles after a warm reset if the two different ATR-s don't specify the same supported protocols in the ATR.
To work around it, resetting the card is required. Sadly, one of the cards that copies the ATR with both T=1 and T=0 in the warm ATR actually is the one who *can't* speak T=1.
But also, the card is difficult to match because of the copied ATR. This will result in needless reset's ("force_protocol" in OpenSC) to get the card to a known good state and slows down the already slow communication.
So with "original" cards the cold ATR claims T=1 support but after a warm reset can't be used with T=1 before a card powerdown. With the "broken" card, T=1 will be selected by pcsc-lite by default after a warm reset, but T=0 should be used to make the card work and this will also require a reset.
I'm windering if pcsc-lite should only consider the cold ATR (if there are two different ATR-s) and the protocols claimed there for protocol agreement? What does the ISO specs say about it? These (IMO broken by design) cards are already out there and need the mentioned reset-workarounds, but maybe pcsc-lite could be "improved" as well (if it would make sense)
All the best,
Muscle mailing list