aboutsummaryrefslogtreecommitdiff
path: root/TODO.md
Commit message (Collapse)AuthorAge
* Document that NK_is_AES_supported is unsupportedRobin Krahl2019-01-16
| | | | | | NK_is_AES_supported is not needed for newer firmware versions of the Pro and Storage, see this discussion for more information: https://github.com/Nitrokey/libnitrokey/issues/142
* Fix result_from_string for empty return valuesRobin Krahl2019-01-16
| | | | | | | | | | | An empty string returned from a libnitrokey function can either indicate an error or be a valid return value. Previously, we assumed that it indicates an error. But instead, we should check the last command status and use it to decide whether to return the empty string or an error code. This breaks the unit tests that assume that empty strings cause errors. These will be fixed in the next patches.
* Add the clear_new_sd_card_warning method to StorageRobin Krahl2019-01-14
| | | | | | The clear_new_sd_card_warning method calls the libnitrokey NK_clear_new_sd_card_warning function to reset the corresponding flag in the Storage status.
* Add the get_production_info method to the Storage structRobin Krahl2019-01-14
| | | | | | | | | | | The get_production_info method maps to the NK_get_production_info function of libnitrokey. The Storage firmware supports two query modes: with or without a write test. libnitrokey only performs the query without write test, so the fields that are only set for the write test are ignored in our implementation. This affects: - user and admin retry counts - smart card ID - SD card size
* Add export_firmware method to StorageRobin Krahl2019-01-12
| | | | | | | The export_firmware method writes the firmware of the Nitrokey Storage to the unencrypted storage. We only test that the command succeeds as mounting the unencrypted storage and accessing the file is out of scope for the tests.
* Document unsupported outdated functionsRobin Krahl2019-01-12
| | | | | | | | | | We do not support old firmware versions on the Nitrokey Storage, so we document that these outdated functions are not supported: - NK_set_unencrypted_volume_rorw_pin_type_user - NK_set_unencrypted_read_only - NK_set_unencrypted_read_write - NK_set_encrypted_read_only - NK_set_encrypted_read_write
* Add set_unencrypted_volume_mode to StorageRobin Krahl2019-01-12
| | | | | | | | | | The new set_unencrypted_volume_mode method sets the access mode of the unencrypted volume on the Nitrokey Storage. Depending on the requested access mode, it calls either NK_set_unencrypted_read_only_admin or NK_set_unencrypted_read_write_admin. Note that this function requires firmware version 0.51 or later. (Earlier firmware versions used the user PIN.)
* Update readme and todo for NK_get_device_modelRobin Krahl2019-01-11
|
* Add the wink method to the Storage structRobin Krahl2019-01-11
| | | | | | This patch adds the wink method to the Storage struct that lets the Nitrokey device blink until reconnected. We do not test this method as it does not change the state that we can observe.
* Add the get_library_version functionRobin Krahl2019-01-11
| | | | | | | This patch adds the get_library_version function to the main library module that queries and returns the libnitrokey version. As the version fields are static values, we fetch them all at the same time and do not provide getters for the individual fields.
* Add support for the hidden volumes on a Nitrokey StorageRobin Krahl2019-01-06
| | | | | | | | | | This patch introduces the methods enable_hidden_volume, disable_hidden_volume and create_hidden_volume for the Storage struct to support the hidden volumes on the Nitrokey Storage. The enable and create methods require that the encrypted storage has been enabled. Contrary to authentication and password safe access, we do not enforce this requirement in the API as file system operations could have unwanted side effects and should not performed implicitly.
* Add Storage::enable_firmware_update methodRobin Krahl2019-01-03
| | | | | | | | This patch adds the enable_firmware_update method to the Storage struct that uses NK_enable_firmware_update to put the Nitrokey Storage into update mode. This method is not tested as external tooling is required to resume normal operation and as it is hard to bail out if an error occurs.
* Add Device::build_aes_key methodRobin Krahl2019-01-03
| | | | | | | | This patch adds the build_aes_key method to the Device trait that uses the NK_build_aes_key function to build new AES keys on the device. This effectively resets the password safe and the encrypted storage. It is unclear whether other data (e. g. the one-time passwords) are affected too.
* Add Device::factory_reset methodRobin Krahl2019-01-03
| | | | | | | This patch adds the factory_reset_method to the Device trait that uses the NK_factory_reset function to perform a factory reset. The tests verify that the user and admin PIN are reset and that the OTP storage and the password safe are deleted.
* Add Storage::change_update_pin methodRobin Krahl2019-01-03
| | | | | | This patch adds the change_update_pin method to the Storage struct that uses the NK_change_update_password function to set the password required for firmware updates.
* Add force argument to ConfigureOtp::set_timeRobin Krahl2019-01-02
| | | | | | | | This patch adds the force argument to the set_time method in the ConfigureOtp trait that allows the user to choose whether jumps to the past are allowed when updating the time. It is implemented by using the NK_totp_set_time_soft function. Previously, jumps where unconditionally allowed.
* Provide access to the status of a Nitrokey StorageRobin Krahl2018-12-10
| | | | | | This patch adds a `get_status` method to the `Storage` structure. The returned structure `StorageStatus` is based on the structure provided by libnitrokey.
* Add a Storage-only example to the DeviceWrapper documentationRobin Krahl2018-12-10
| | | | | | | As connect() now returns DeviceWrappers of the correct type, this patch adds an example to the DeviceWrapper documentation that shows how to use type conditions, i. e. how to execute a command only for Nitrokey Storage devices.
* Fix generic connections (connect()) to return correct deviceRobin Krahl2018-12-10
| | | | | | This patch fixes the generic connect() method to return a DeviceWrapper of the correct type. This is enabled by the NK_get_device_model() method introduced in libnitrokey v3.4.
* Always free string pointers returned by libnitrokeyRobin Krahl2018-12-10
| | | | | | | | Old libnitrokey versions could return pointers to both statically and dynamically allocated strings for functions that return strings. This has been fixed in libnitrokey commit 7a8550d (included in v3.4). This patch removes the old workaround and always frees the return value of functions returning a string pointer.
* Update to nitrokey-sys v3.4.0Robin Krahl2018-12-10
|
* Remove NK_lock_device call from PasswordSafe::dropRobin Krahl2018-06-07
| | | | | | | | | | | | | | | | | | | When enabled, the password safe can be used without authentication. The lock device can be used to lock the password safe. Currently, PasswordSafe::drop calls this command to make sure that other applications cannot access the password safe without authentication. On the Nitrokey Storage, locking the device may also disable the encrypted or hidden volume. As using the password safe should not have side effects on the storage volumes, this patch removes the call to the lock device command from the Drop implementation. Instead, the user should call this method after making sure that it does not have side effects. A feature request for a command that only locks the password safe without side effects is submitted to the Nitrokey Storage firmware repository: https://github.com/Nitrokey/nitrokey-storage-firmware/issues/65
* Add support for encrypted volumeRobin Krahl2018-06-07
| | | | | | | | | | | | | | | | | This patch adds support for the commands to enable or disable the encrypted volume on the Nitrokey Storage. To test these commands, the output of lsblk is parsed for the device model “Nitrokey Storage”. This is not perfect but seems to be the best solution for automated testing. As the effect of enabling and disabling volumes is not immediate, a delay of two seconds is added to the tests before checking lsblk. This is sufficient on my machine, yet it would be better to have a portable version of this check. This patch also adds a lock method to Device that executes the lock_device command. This command was previously only used to close the password safe. On the Nitrokey Storage, it also disables the encrypted and hidden volume.
* Implement Drop for PasswordSafeRobin Krahl2018-06-05
| | | | | | By calling NK_lock_device when dropping a PasswordSafe instance, we can make sure that the password safe cannot be reused without authentication.
* Add traits for easier error handling to todo listRobin Krahl2018-06-05
| | | | | | Implementing Into<CommandError> for (Device, CommandError) might allow a user to use the ? operator on methods like authenticate_user within a method returning a CommandError.
* Add tests with different TOTP time windowsRobin Krahl2018-06-05
| | | | | | | | While 30 seconds is the default time step for TOTP, arbitrary values are possible. Yet the RFC does only provide test cases for the default time window. This patch adds tests where these test cases are applied for a time window of 60 seconds (if both the current time and the time window double, the resulting TOTP code is the same).
* Add support for unlock_user_password commandRobin Krahl2018-05-31
|
* Add support for password safesRobin Krahl2018-05-29
| | | | | | | | | A password safe (PWS) stores names, logins and passwords in slots. PWS are supported both by the Nitrokey Pro and the Nitrokey Storage. They are implemented as a struct wrapping a device as the device may not be disconnected while the password safe is alive. The creation of a password safe is handled by the GetPasswordSafe trait, implemented by DeviceWrapper, Pro and Storage.
* Add rudimentary support for the Nitrokey StorageRobin Krahl2018-05-29
| | | | | This patch adds the Storage struct and the test-storage feature. It also enables all currently supported Pro commands for the Storage.
* Group tests by tested functionalityRobin Krahl2018-05-28
|
* Improve log level documentationRobin Krahl2018-05-22
| | | | | | Now, the documentation clearly states the purpose of each log level. Also, the documentation for set_log_level is corrected: libnitrokey always prints to stderr.
* Add an example for setting the current timeRobin Krahl2018-05-22
| | | | | The example uses the chrono crate and can therefore not be executed, but at least it shows how to set the Nitrokey device to the current time.
* Use drop() instead of disconnect()Robin Krahl2018-05-22
| | | | | | | | Previously, the user had to explicitly call diconnect() to terminate the connection to the Nitrokey. Now NK_logout() is called automatically once the device is out of scope as UnauthenticatedDevice implements Drop. AdminAuthenticatedDevice and UserAuthenticatedDevice do not have to implement Drop, as it will be called recursively.
* Add support for change_admin_pin and change_user_pinRobin Krahl2018-05-22
|
* Add support for erase_hotp_slot and erase_totp_slotRobin Krahl2018-05-22
|
* Re-add segmentation fault issues to todo listRobin Krahl2018-05-21
| | | | | | I removed the segfault note in the todo list when moving to libnitrokey v3.3. Yet the commit fixing this issue -- 7a8550d -- is not part of that version.
* Use NK_login_enum instead of NK_loginRobin Krahl2018-05-21
| | | | | | NK_login used a string to identify the model to connect to. Since libnitrokey v3.3, we can use NK_login_enum together with an enum value as a more type-safe alternative.
* Add get_minor_firmware_version to DeviceRobin Krahl2018-05-21
| | | | Since libnitrokey v3.3, we can also access the minor firmware version.
* Update nitrokey-sys dependency to v3.3.0Robin Krahl2018-05-21
| | | | | | | Now libnitrokey v3.3 is compiled from source, fixing the problems with older libnitrokey versions (freeing strings, firmware version getter). Also, bindgen is no longer a build dependency. This makes the build process a lot faster.
* Initial commitRobin Krahl2018-05-19