pcsc: a change in ATR will not always mean a changed card, rely on PC/SC layer for card change information.
One of the few cards that has two different ATR-s is the EstonianEid card. The changing ATR (especially if it has different protocol information and historical bytes) can cause confusion in many places, like Microsoft BaseCSP or certain versions of pcsc-lite. git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4890 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
6fc7e62f20
commit
77c8cfc37d
@ -305,11 +305,10 @@ static int refresh_attributes(sc_reader_t *reader)
|
||||
if (priv->reader_state.cbAtr > SC_MAX_ATR_SIZE)
|
||||
return SC_ERROR_INTERNAL;
|
||||
|
||||
/* ATR changes => card changed */
|
||||
/* Some cards have a different cold (after a powerup) and warm (after a reset) ATR */
|
||||
if (memcmp(priv->reader_state.rgbAtr, reader->atr, priv->reader_state.cbAtr) != 0) {
|
||||
reader->atr_len = priv->reader_state.cbAtr;
|
||||
memcpy(reader->atr, priv->reader_state.rgbAtr, reader->atr_len);
|
||||
reader->flags |= SC_READER_CARD_CHANGED;
|
||||
}
|
||||
|
||||
if (old_flags & SC_READER_CARD_PRESENT) {
|
||||
|
Loading…
Reference in New Issue
Block a user