libnitrokey icon indicating copy to clipboard operation
libnitrokey copied to clipboard

Avoid unnecessary commands when querying the retry counts

Open robinkrahl opened this issue 3 years ago • 1 comments

https://github.com/Nitrokey/libnitrokey/blob/d75348816e1254fc0d051e9c454516c32d8d71d7/NitrokeyManager.cc#L788-L802

Isn’t it possible to directly use the response of GetDeviceStatus for Storage devices?

robinkrahl avatar May 02 '21 11:05 robinkrahl

Good catch! Indeed, on the firmware side the status call refreshes the smart card counters, and seems to return the correct values. I guess this was supposed to be an early return for the Nitrokey Storage, but somehow was not implemented.

Firmware side implementation: https://github.com/Nitrokey/nitrokey-storage-firmware/blob/f376b081d5900f9e494f74230f79df7552ae8e1f/src/USER_INTERFACE/html_io.c#L575-L588

szszszsz avatar May 03 '21 10:05 szszszsz