You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For my Nitrokey Storage, GET_STATUS reports the serial number 0 and firmware version 0.1, whereas GET_DEVICE_STATUS reports the serial number 327680 and firmware version 0.53 (although the serial number isn’t correct either, see #76).
Example code:
#include<stdio.h>#include<stdlib.h>#include<NK_C_API.h>intmain(void)
{
interr=NK_login_auto();
if (err==0) {
fprintf(stderr, "Could not connect to Nitrokey.\n");
return1;
}
NK_set_debug(true);
structNK_statusstatus= {};
err=NK_get_status(&status);
if (err!=0) {
fprintf(stderr, "Could not get status: %d\n", err);
return1;
}
structNK_storage_statusstorage_status= {};
err=NK_get_status_storage(&storage_status);
if (err!=0) {
fprintf(stderr, "Could not get storage status: %d\n", err);
return1;
}
return0;
}
As described in this issue [0], the GET_STATUS command does not work for
the Nitrokey Storage. Therefore, NitrokeyManager::get_status does not
work either. To fix this, we additionally execute the GET_DEVICE_STATUS
command if a Nitrokey Storage is detected to determine the serial number
and the firmware version. This also fixes the failing test
test_get_status that we introduced in the last patch.
FixesNitrokey#166.
[0] Nitrokey/nitrokey-storage-firmware#96
For my Nitrokey Storage,
GET_STATUS
reports the serial number 0 and firmware version 0.1, whereasGET_DEVICE_STATUS
reports the serial number 327680 and firmware version 0.53 (although the serial number isn’t correct either, see #76).Example code:
Log excerpts:
The text was updated successfully, but these errors were encountered: