Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix get_status for Nitrokey Storage #167

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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