1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-21 10:09:57 +01:00

scd: Handle error of SCardStatus.

* scd/apdu.c (pcsc_get_status): On removal, it may return
PCSC_E_INVALID_VALUE.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2021-05-14 12:51:22 +09:00
parent 8640f66b90
commit f3c6dc1cd1

View File

@ -699,6 +699,8 @@ pcsc_get_status (int slot, unsigned int *status, int on_wire)
{
log_error ("pcsc_status failed: %s (0x%lx)\n",
pcsc_error_string (err), err);
if (err == PCSC_E_INVALID_VALUE)
err = PCSC_E_NO_SMARTCARD;
return pcsc_error_to_sw (err);
}