From: Jakub J. <no...@gi...> - 2019-11-01 14:50:50
|
Branch: refs/heads/master Home: https://github.com/OpenSC/OpenSC Commit: 0ea11523a3b6a90a9c3ee380218baaa9ef7faa5f https://github.com/OpenSC/OpenSC/commit/0ea11523a3b6a90a9c3ee380218baaa9ef7faa5f Author: Jakub Jelen <jj...@re...> Date: 2019-11-01 (Fri, 01 Nov 2019) Changed paths: M src/pkcs11/framework-pkcs15.c M src/pkcs11/pkcs11-global.c Log Message: ----------- Improve logging of exit codes Commit: fb15a7dd8654dee63c9e22f949d6b120b70ea914 https://github.com/OpenSC/OpenSC/commit/fb15a7dd8654dee63c9e22f949d6b120b70ea914 Author: Jakub Jelen <jj...@re...> Date: 2019-11-01 (Fri, 01 Nov 2019) Changed paths: M src/libopensc/reader-pcsc.c Log Message: ----------- reader-pcsc: Handle yubikey reinsertion When the application (NSS) does not use WaitForSlotEvent and just opportunistically tries to detect card and reader removals with C_GetSlotInfo() and C_GetSessionInfo(), we might get errors in various plcaes, in the sc_lock() function, when we try to transfer other messages or when we ask for the reader status. This is generally too late to call any disconnect functions because no PC/SC handles are valid anymore. The reader state from PCSC is searched by name so we can be pretty sure it is very similar reader (with same name as the old one) and I hope we can reuse the reader structure and just call the pcsc_connect() on that as we do with invalid handles. Otherwise we detect this issue in the refresh_attributes() (called from C_GetSlotInfo()), where we can report the slot change in the expected manner. Fixes #1822 Compare: https://github.com/OpenSC/OpenSC/compare/3c87ffaa021e...fb15a7dd8654 |