Skip to content

Conversation

@robinkrahl
Copy link
Contributor

Extends the test_get_status test case to catch the problem with get_status for
the Nitrokey Storage described in #166, and then fixes the problem by adding
the GET_DEVICE_STATUS command to the NitrokeyManager::get_status method.

This patch extends the test_get_status test case to check the content of
the returned status struct.  The firmware version, serial number and
config should match the values returned by the NK_*_firmware_version,
NK_device_serial_number and NK_read_config functions.

This does not work for the Nitrokey Storage, which will be fixed in the
next patch.
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.

Fixes Nitrokey#166.

[0] Nitrokey/nitrokey-storage-firmware#96
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant