Created attachment 1206 [details] Smart card setting hang When batch testing smart card authentication, i noticed that the client hangs for a while when i change the setting from password- to "Smart card"-authentication. This happens on macOS (tested on the M1 mac in the lab), and only if a card reader with an inserted card is connected to the mac when the setting is changed. Steps to reproduce: 1. Connect a card reader with an inserted smart card 2. Start tlclient that has password authentication enabled 3. Change authentication method to smart card 4. Click Ok to close the settings window 5. The client hangs If the card is removed from the reader, the client immediately resumes and the settings window closes. If the card is not removed, the client resumes after about 60 seconds.
This is a known general issue in that OpenSC takes quite some time to read the data of the smart card. It does so on the main thread, hanging the UI until it is done. It happens everywhere OpenSC needs to read the card, not just via the method described here. Furthermore, it also happens on every platform, not just macOS. 60 seconds seems very excessive, though, so it's unclear what specific card/reader was used in the initial test to get that long delay.