* compile it using: `g++ nk.cc -o nk -lnitrokey -I/usr/include`
* run it: `./nk`
**Observed behavior:** The executable will hang inside the `NK_list_devices()` call
**Expected behavior:** The executable should return immediately, while ignoring any other devices
**Environment:**
* Arch Linux (Kernel 5.9.12-arch1-1, AMD64)
* libnitrokey version 3.6 (package release 1)
* Nitrokey FIDO2 & Nitrokey Pro 2
Bug report: The
NK_list_devices()
C-API call, while a Nitrokey FIDO2 device is plugged in, will never return and load one cpu.How to reproduce:
libnitrokey
and its headers must be installednk.cc
) with the following content:using namespace std;
int main() { struct NK_device_info* x = NK_list_devices(); cout << x->model << endl; cout << x->path << endl; cout << x->serial_number << endl; }