From e0baabd1046087a9f545d9ef65539c23eb91e85f Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Mon, 6 Jan 2020 11:12:50 +0000 Subject: Update the list of unsupported functions After some more research, I decided not to implement some of the methods provided by libnitrokey. This patch adds them to the list of unsupported functions in the readme, and removes them from the list of unimplemented functions in the todo list. --- TODO.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'TODO.md') diff --git a/TODO.md b/TODO.md index 54525ef..8adea87 100644 --- a/TODO.md +++ b/TODO.md @@ -4,18 +4,13 @@ SPDX-License-Identifier: CC0-1.0 --> - Add support for the currently unsupported commands: - - `NK_send_startup` - `NK_fill_SD_card_with_random_data` - `NK_get_SD_usage_data` - `NK_get_progress_bar_value` - - `NK_list_devices_by_cpuID` - - `NK_connect_with_ID` - - `NK_get_status` + - `NK_get_status` -- waiting for [libnitrokey issue 166][] - `NK_list_devices` - `NK_free_device_info` - `NK_connect_with_path` - - `NK_enable_firmware_update_pro` - - `NK_change_firmware_password_pro` - Clear passwords from memory. - Lock password safe in `PasswordSafe::drop()` (see [nitrokey-storage-firmware issue 65][]). @@ -23,4 +18,5 @@ SPDX-License-Identifier: CC0-1.0 - Check timing in Storage tests. - Consider restructuring `device::StorageStatus`. +[libnitrokey issue 166]: https://github.com/Nitrokey/libnitrokey/issues/166 [nitrokey-storage-firmware issue 65]: https://github.com/Nitrokey/nitrokey-storage-firmware/issues/65 -- cgit v1.2.1 From c74b8b3ea8dc4fe7c6891ae120540f8da5623227 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Sun, 29 Dec 2019 12:51:28 +0100 Subject: Add list_devices function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch adds support for libnitrokey’s NK_list_devices function by introducing the top-level list_devices function. It returns a vector of DeviceInfo structs with information about all connected Nitrokey devices. --- TODO.md | 2 -- 1 file changed, 2 deletions(-) (limited to 'TODO.md') diff --git a/TODO.md b/TODO.md index 8adea87..e3708f9 100644 --- a/TODO.md +++ b/TODO.md @@ -8,8 +8,6 @@ SPDX-License-Identifier: CC0-1.0 - `NK_get_SD_usage_data` - `NK_get_progress_bar_value` - `NK_get_status` -- waiting for [libnitrokey issue 166][] - - `NK_list_devices` - - `NK_free_device_info` - `NK_connect_with_path` - Clear passwords from memory. - Lock password safe in `PasswordSafe::drop()` (see [nitrokey-storage-firmware -- cgit v1.2.1 From 97c772724dd1fe395e7154e0d71c3b2408436082 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Sun, 29 Dec 2019 13:15:04 +0100 Subject: Add the connect_path function to the Manager struct This patch adds the connect_path function to the Manager struct that uses NK_connect_with_path to connect to a Nitrokey device at a given USB path. --- TODO.md | 1 - 1 file changed, 1 deletion(-) (limited to 'TODO.md') diff --git a/TODO.md b/TODO.md index e3708f9..eba14be 100644 --- a/TODO.md +++ b/TODO.md @@ -8,7 +8,6 @@ SPDX-License-Identifier: CC0-1.0 - `NK_get_SD_usage_data` - `NK_get_progress_bar_value` - `NK_get_status` -- waiting for [libnitrokey issue 166][] - - `NK_connect_with_path` - Clear passwords from memory. - Lock password safe in `PasswordSafe::drop()` (see [nitrokey-storage-firmware issue 65][]). -- cgit v1.2.1 From dbee55efa41496c8a683bfab96163facc93d6639 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Sat, 11 Jan 2020 20:05:39 +0100 Subject: Add support for the GET_STATUS command This patch adds support for the GET_STATUS command that returns the status information common to all Nitrokey devices. It can be accessed using the Device::get_status function and is stored in a Status struct. Due to a bug in the Storage firmware [0], the GET_STATUS command returns wrong firmware versions and serial numbers. Until this is fixed in libnitrokey [1], we have to manually execute the GET_DEVICE_STATUS command to fix these values for the Nitrokey Storage. Also, this leads to a name clash with the existing Storage::get_status function, which will be renamed in an upcoming patch. [0] https://github.com/Nitrokey/nitrokey-storage-firmware/issues/96 [1] https://github.com/Nitrokey/libnitrokey/issues/166 --- TODO.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'TODO.md') diff --git a/TODO.md b/TODO.md index eba14be..ed5a0ca 100644 --- a/TODO.md +++ b/TODO.md @@ -7,13 +7,12 @@ SPDX-License-Identifier: CC0-1.0 - `NK_fill_SD_card_with_random_data` - `NK_get_SD_usage_data` - `NK_get_progress_bar_value` - - `NK_get_status` -- waiting for [libnitrokey issue 166][] - Clear passwords from memory. - Lock password safe in `PasswordSafe::drop()` (see [nitrokey-storage-firmware issue 65][]). - Disable creation of multiple password safes at the same time. - Check timing in Storage tests. - Consider restructuring `device::StorageStatus`. +- Consider renaming `Storage::get_status` (cf. `Device::get_status`). -[libnitrokey issue 166]: https://github.com/Nitrokey/libnitrokey/issues/166 [nitrokey-storage-firmware issue 65]: https://github.com/Nitrokey/nitrokey-storage-firmware/issues/65 -- cgit v1.2.1 From 6142752da1563c1ab873dc7069aeec72522cca99 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Sat, 11 Jan 2020 20:13:22 +0100 Subject: Rename Status::get_status to get_storage_status MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In the last patch, we added the get_status function to the Device trait. This patch renames the Storage::get_status function to get_storage_status to resolve the name clash – though allowed by the compiler, it is rather confusing for the end user. --- TODO.md | 1 - 1 file changed, 1 deletion(-) (limited to 'TODO.md') diff --git a/TODO.md b/TODO.md index ed5a0ca..aaa6856 100644 --- a/TODO.md +++ b/TODO.md @@ -13,6 +13,5 @@ SPDX-License-Identifier: CC0-1.0 - Disable creation of multiple password safes at the same time. - Check timing in Storage tests. - Consider restructuring `device::StorageStatus`. -- Consider renaming `Storage::get_status` (cf. `Device::get_status`). [nitrokey-storage-firmware issue 65]: https://github.com/Nitrokey/nitrokey-storage-firmware/issues/65 -- cgit v1.2.1 From 73c8aebac338d3454d7e345ffd687324317077ec Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Tue, 14 Jan 2020 12:00:15 +0100 Subject: Add the get_sd_card_usage function to the Storage struct This patch adds support for the NK_get_SD_usage_data function. It returns a range of the SD card that has not been accessed during this power cycle. --- TODO.md | 1 - 1 file changed, 1 deletion(-) (limited to 'TODO.md') diff --git a/TODO.md b/TODO.md index aaa6856..3c095e0 100644 --- a/TODO.md +++ b/TODO.md @@ -5,7 +5,6 @@ SPDX-License-Identifier: CC0-1.0 - Add support for the currently unsupported commands: - `NK_fill_SD_card_with_random_data` - - `NK_get_SD_usage_data` - `NK_get_progress_bar_value` - Clear passwords from memory. - Lock password safe in `PasswordSafe::drop()` (see [nitrokey-storage-firmware -- cgit v1.2.1 From 45b2bc5c77a2f5c22ee6a75c1c1d2b4f9b458943 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Tue, 14 Jan 2020 12:25:41 +0100 Subject: Remove todo notes for Storage tests and refactoring This patch removes two items from the todo list: - Check timing in Storage tests: Since we introduced the two seconds timeout, no test failed due to timing issues. There is nothing we can do to check it more precisely, so we just have to live with it for now. - Consider restructuring `device::StorageStatus`: We already have structs for the volume status and firmware version. There is no need to extract more fields. --- TODO.md | 2 -- 1 file changed, 2 deletions(-) (limited to 'TODO.md') diff --git a/TODO.md b/TODO.md index 3c095e0..79a68e4 100644 --- a/TODO.md +++ b/TODO.md @@ -10,7 +10,5 @@ SPDX-License-Identifier: CC0-1.0 - Lock password safe in `PasswordSafe::drop()` (see [nitrokey-storage-firmware issue 65][]). - Disable creation of multiple password safes at the same time. -- Check timing in Storage tests. -- Consider restructuring `device::StorageStatus`. [nitrokey-storage-firmware issue 65]: https://github.com/Nitrokey/nitrokey-storage-firmware/issues/65 -- cgit v1.2.1 From f266ea63039c87886f871b068ef3dcdf851a1eca Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Tue, 14 Jan 2020 13:48:56 +0100 Subject: Add the get_operation_status function to the Storage struct This patch adds support for the NK_get_progress_bar_value function: It adds the OperationStatus enum that stores the return value of this command and adds the get_operation_status function to the Storage struct that executes the command. --- TODO.md | 1 - 1 file changed, 1 deletion(-) (limited to 'TODO.md') diff --git a/TODO.md b/TODO.md index 79a68e4..8f9b898 100644 --- a/TODO.md +++ b/TODO.md @@ -5,7 +5,6 @@ SPDX-License-Identifier: CC0-1.0 - Add support for the currently unsupported commands: - `NK_fill_SD_card_with_random_data` - - `NK_get_progress_bar_value` - Clear passwords from memory. - Lock password safe in `PasswordSafe::drop()` (see [nitrokey-storage-firmware issue 65][]). -- cgit v1.2.1 From 2e543445c3059fa9decdbef718caf84696bb8786 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Tue, 14 Jan 2020 16:15:40 +0100 Subject: Add the fill_sd_card function to Storage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch adds support for libnitrokey’s NK_fill_SD_card_with_random_data function. It is executed by the fill_sd_card function of the Storage struct. We also add a new test case that is set to ignore because it takes between 30 and 60 minutes to run. --- TODO.md | 2 -- 1 file changed, 2 deletions(-) (limited to 'TODO.md') diff --git a/TODO.md b/TODO.md index 8f9b898..ef2f6d4 100644 --- a/TODO.md +++ b/TODO.md @@ -3,8 +3,6 @@ Copyright (C) 2019 Robin Krahl SPDX-License-Identifier: CC0-1.0 --> -- Add support for the currently unsupported commands: - - `NK_fill_SD_card_with_random_data` - Clear passwords from memory. - Lock password safe in `PasswordSafe::drop()` (see [nitrokey-storage-firmware issue 65][]). -- cgit v1.2.1 From 0712d48132b172837ba9e63e5fbe904a88919ce7 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Tue, 14 Jan 2020 17:42:54 +0100 Subject: Remove multiple PWS item from todo list With commit f49e61589e32217f97c94aa86d826f6b65170fba, we changed the GetPasswordSafe::get_password_safe to take a mutable reference to a device. This makes sure that we cannot have two PWS instances for one device at the same time, so we can drop the corresponding item from the todo list. --- TODO.md | 1 - 1 file changed, 1 deletion(-) (limited to 'TODO.md') diff --git a/TODO.md b/TODO.md index ef2f6d4..92d4b04 100644 --- a/TODO.md +++ b/TODO.md @@ -6,6 +6,5 @@ SPDX-License-Identifier: CC0-1.0 - Clear passwords from memory. - Lock password safe in `PasswordSafe::drop()` (see [nitrokey-storage-firmware issue 65][]). -- Disable creation of multiple password safes at the same time. [nitrokey-storage-firmware issue 65]: https://github.com/Nitrokey/nitrokey-storage-firmware/issues/65 -- cgit v1.2.1