1
0
mirror of git://git.gnupg.org/gnupg.git synced 2025-01-02 12:01:32 +01:00

scd: Fix for card change returning GPG_ERR_CARD_RESET.

* scd/apdu.c (apdu_connect): Do not test for zero atrlen.
--
When gpg-agent prompts for insertion of a card this error would be
returned.

Co-authored-by: Ben Kibbey <bjk@luxsci.net>
This commit is contained in:
Werner Koch 2011-12-19 18:26:47 +01:00 committed by NIIBE Yutaka
parent 6859554448
commit 2586eac997

View File

@ -3078,8 +3078,7 @@ apdu_connect (int slot)
;
else if (!(status & APDU_CARD_PRESENT))
sw = SW_HOST_NO_CARD;
else if (((status & APDU_CARD_PRESENT) && !(status & APDU_CARD_ACTIVE))
|| !reader_table[slot].atrlen)
else if ((status & APDU_CARD_PRESENT) && !(status & APDU_CARD_ACTIVE))
sw = SW_HOST_CARD_INACTIVE;