Nitrokey / nitrokey-hotp-verification

A command line C app to validate HOTP codes on Heads
GNU General Public License v3.0
11 stars 10 forks source link

`regenerate` breaks/stalls Nitrokey Storage communication #27

Open daringer opened 1 year ago

daringer commented 1 year ago

to reproduce:

❯ gpg --card-status gpg: selecting card failed: No such device gpg: OpenPGP card not available: No such device



It looks like the regenerate command somehow leads to the smartcard failing afterwards, although a power-cycle restores it again. Furthermore on my local machine restarting `pcscd` also fixes the issue. 

This seems not to be related to a recent change inside `hotp_verification` but moreover it is likely related to a recent `gpg` version. Ultimately, I would assume `hotp_verification` somehow leaves the interface in a "weird" state - so the best fix is likely done in this repo here, although a workaround shall be possible in the meantime.