I wrote the first version of the current status command when I was not
too familiar with libnitrokey inner workings. This resulted in a
combinaton of funtions that requires more command invocations than
necessary. With this patch, we can reduce the number of command
invocations from three to one GetStatus commands for the Nitrokey Pro
and from six to two GetDeviceStatus commands for the Nitrokey Storage.
Once a minor issue in nitrokey-rs [0] is fixed, we can further reduce
the Nitrokey Storage case to a single GetDeviceStatus invocation.
I wrote the first version of the current status command when I was not too familiar with libnitrokey inner workings. This resulted in a combinaton of funtions that requires more command invocations than necessary. With this patch, we can reduce the number of command invocations from three to one GetStatus commands for the Nitrokey Pro and from six to two GetDeviceStatus commands for the Nitrokey Storage.
Once a minor issue in nitrokey-rs [0] is fixed, we can further reduce the Nitrokey Storage case to a single GetDeviceStatus invocation.
[0] https://todo.sr.ht/~ireas/nitrokey-rs/1