nitrokey-rs/TODO.md -rw-r--r-- 437 bytes
Support the Librem Key model

This patch adds support for the Librem Key model, a clone of the
Nitrokey Pro.  Functionally, it is identical to the Nitrokey Pro, but it
has a different USB vendor and product ID.

With this patch, we also change the Display implementation for Model to
return the complete name of the model, i. e. Nitrokey Pro, Nitrokey
Storage or Librem Key.
Use NK_config struct for configuration handling

Previously, the Nitrokey configuration was represented as an array in
libnitrokey.  libnitrokey 3.6 added the NK_config struct and the
NK_{read,write}_config_struct for type-safe configuration handling.
This patch replaces the old functions with the new versions using the
NK_config struct.  This makes the RawConfig struct obsolete as it is
identical to NK_config.
Correctly free pointer to PWS status

The NK_get_password_safe_slot_status function returns a pointer to an
array that has been allocated using new[].  As we only have access to
libc’s free function, we could not free this pointer properly (using
delete[]).  libnitrokey 3.6 added the NK_free_password_safe_slot_status
function which we now use to properly free the pointer.
Use NK_device_serial_number_as_u32

Previously, we called the NK_device_serial_number function in
Device::get_serial which returned a string that we had to parse into an
unsigned integer to use with the SerialNumber struct.  libnitrokey 3.6
introduced the NK_device_serial_number_as_u32 function that returns the
serial number as an unsigned integer.  This patch replaces the call to
NK_device_serial_number with this new function.
Update nitrokey-sys to v3.6.0

This patch updates the nitrokey-sys dependency to version 3.6.0, which
links to libnitrokey 3.6.
Merge branch 'hotfix-0.5.2' into next
Merge branch 'hotfix-0.5.2'
Regenerate temporary passwords with null bytes

Previously, we silently cut off temporary passwords that contained a
null byte.  With the change to CString, we returned a LibraryError
instead.  With this patch, we change to generate_password function to
continue generating passwords until we have a password without a null

The chance of generating a password with a null byte is ca. 10 % for our
temporary password with 25 characters.  Therefore the chance of having
to re-generate the password multiple times is low enough that we don’t
bother with re-generating only the null bytes of the password for the
time being.  This should be improved in the future.
Merge branch 'release-0.5.0'
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.
Add the fill_sd_card function to Storage

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
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.
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
- Consider restructuring `device::StorageStatus`:  We already have
  structs for the volume status and firmware version.  There is no need
  to extract more fields.
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.
Rename Status::get_status to get_storage_status

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.
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
Merge branch 'connect_path' into next

This patch series adds the list_devices function that returns a list of
available Nitrokey devices and the Manager::connect_path function that
connects to one of the available devices.
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
Add list_devices function

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
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.