Fix get_status for Nitrokey Storage#167
Open
robinkrahl wants to merge 2 commits intoNitrokey:masterfrom
Open
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.