From: Frank M. <no...@gi...> - 2022-04-19 21:28:36
|
Branch: refs/heads/master Home: https://github.com/OpenSC/OpenSC Commit: 1b05d7664801d33f43475dfebb8741935977ad73 https://github.com/OpenSC/OpenSC/commit/1b05d7664801d33f43475dfebb8741935977ad73 Author: Frank Morgner <fra...@gm...> Date: 2022-04-19 (Tue, 19 Apr 2022) Changed paths: M src/libopensc/opensc.h M src/libopensc/reader-pcsc.c M src/minidriver/minidriver.c Log Message: ----------- Windows changed readers (alternative) (#2525) Issue #2517 reports that minidriver may be presented with new handles to PCSC, even if card is moved from one reader to another. The previous code assumed a change in handles would always point at same reader. and if reader was changed, caller would do two operations: card is removed from one reader i.e. call CardDeleteContext and some time later when card is inserted, call CardAcquireContext. Thus previous code would not to call reinit_card_for. But this is not the case. So when handles change, the new handles are used to probe the new reader to obtain reader name to compare to old reader name. If they are the same returns to not call reinit_card. If they are different returns to call reinit_card. The assumption is if card is removed, it could be modified on another system then inserted on original system which changed data. |