scd: Fix removal of unplugged usb readers on Windows.
authorDaniel Hoffend <dh@dotlan.net>
Sun, 6 Dec 2015 23:13:59 +0000 (00:13 +0100)
committerNIIBE Yutaka <gniibe@fsij.org>
Tue, 15 Dec 2015 00:51:56 +0000 (09:51 +0900)
commit904fbdccd65e537206c0b603f9576a07defebb29
tree098c76f4bb950003bc74abd9b20220cc81e43bee
parent520c85ed94fa2033e0d2ca5f9a0244b7b290b958
scd: Fix removal of unplugged usb readers on Windows.

* scd/apdu.c (pcsc_error_to_sw): map PCSC_E_NO_SERVICE and
PCSC_E_SERVICE_STOPPED to the internal SW_HOST_NO_READER error code.

--

Signed-off-by: Daniel Hoffend <dh@dotlan.net>
GnuPG-bug-id: 2167

In Windows 8 (and later), PC/SC service only runs when reader/token is
plugged in.  After its removal, it returns PCSC_E_NO_SERVICE error.
This error should be handled as no reader.  This comment is by gniibe.

(backport of commit d1a97585c5e73fbc7d4cf90e38f76ffc5aea305f)
scd/apdu.c