Home GnuPG
Diffusion GnuPG f8b8b6aac2ca

scd: Fix status check when using PC/SC.

Description

scd: Fix status check when using PC/SC.

* scd/apdu.c (struct reader_table_s): Add field of current_state.
(new_reader_slot): Initialize current_state.
(pcsc_get_status): Keep the status in READER_TABLE array.
Return SW_HOST_NO_READER when PCSC_STATE_CHANGED.
* scd/scdaemon.c (handle_connections): Silence a warning.

To detect some change of card status, including suspend/resume
possibly, SCardGetStatusChange should be used keeping the
dwCurrentState field.

This change could improve situation for suspend/resume with Yubikey on
Windows. Even not, this is doing the Right Thing.

  • Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>

Details

Provenance
gniibeAuthored on Mar 8 2018, 8:51 AM
Parents
rG334b94898112: gpg: Fix build on Windows.
Branches
Unknown
Tags
Unknown