From: Veronika H. <no...@gi...> - 2024-11-22 08:46:05
|
Branch: refs/heads/master Home: https://github.com/OpenSC/OpenSC Commit: f78439c1049c150018a13eef1c733fa6879998b0 https://github.com/OpenSC/OpenSC/commit/f78439c1049c150018a13eef1c733fa6879998b0 Author: Veronika Hanulíková <vha...@re...> Date: 2024-11-22 (Fri, 22 Nov 2024) Changed paths: M src/libopensc/reader-pcsc.c Log Message: ----------- reader-pcsc: check card status when timeout is received When the reader is removed and inserted back between two consecutive callings to SCardGetStatusChange(), the change is not reported. The SC_READER_CARD_CHANGED should be set and propagated into higher levels. When no reconnection is done afterwards, SCardGetStatusChange() will still return timeout and card handle will be invalid, but SCardStatus() does not report that situation. Commit: 84e76a76e2234ec9b5c32c7d07da1051fe409132 https://github.com/OpenSC/OpenSC/commit/84e76a76e2234ec9b5c32c7d07da1051fe409132 Author: Veronika Hanulíková <vha...@re...> Date: 2024-11-22 (Fri, 22 Nov 2024) Changed paths: M src/libopensc/reader-pcsc.c Log Message: ----------- reader-pcsc: Set flag denoting change when reader is removed When the removed reader is detected for the first time, set SC_READER_CARD_CHANGED denoting change. Remove the flag when the condition is hit again. Before this change, when reader was removed the reader->flags in refresh_attributes() was updated from 0x00000001 (SC_READER_CARD_PRESENT) to 0x00000020 (SC_READER_REMOVED). However, when the reader is still removed by another call to refresh_attributes(), the flags remained as 0x00000020 (SC_READER_REMOVED). Now the flags should change with SC_READER_CARD_CHANGED. When SCardGetStatusChange returns value successfully, remove also SC_READER_REMOVED before setting the current state. Commit: f9d93446b2a7da5fd92ef77b8c0692f1bb2648db https://github.com/OpenSC/OpenSC/commit/f9d93446b2a7da5fd92ef77b8c0692f1bb2648db Author: Veronika Hanulíková <vha...@re...> Date: 2024-11-22 (Fri, 22 Nov 2024) Changed paths: M src/pkcs11/slot.c Log Message: ----------- slot: remove infinite loop when card change happens When reader is removed and inserted back between two consecutive calls to PCSC SCardGetStatusChange() function, and no reconnection is done, the status will remain SC_READER_CARD_CHANGED. Commit: 7eeddcfa3192b0d799b7185911cded60c2ea1c20 https://github.com/OpenSC/OpenSC/commit/7eeddcfa3192b0d799b7185911cded60c2ea1c20 Author: Veronika Hanulíková <vha...@re...> Date: 2024-11-22 (Fri, 22 Nov 2024) Changed paths: M src/libopensc/reader-pcsc.c Log Message: ----------- reader-pcsc: Set card handle to 0 when card disconnected When there is a call to pcsc_disconnect(), the card handle should be invalided afterwards. Otherwise, when there is a call to refresh_attributes() then, it attempts to check the card status change on the invalidated handle and then reports missing token error. Compare: https://github.com/OpenSC/OpenSC/compare/c6e135094579...7eeddcfa3192 To unsubscribe from these emails, change your notification settings at https://github.com/OpenSC/OpenSC/settings/notifications |