<feed xmlns='http://www.w3.org/2005/Atom'>
<title>nitrokey-rs/src/device, branch v0.5.2</title>
<subtitle>Rust interface to libnitrokey</subtitle>
<id>https://git.ireas.org/nitrokey-rs/atom?h=v0.5.2</id>
<link rel='self' href='https://git.ireas.org/nitrokey-rs/atom?h=v0.5.2'/>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/'/>
<updated>2020-01-15T12:19:13Z</updated>
<entry>
<title>Fix serial number for older Nitrokey Pro in list_devices</title>
<updated>2020-01-15T12:19:13Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2020-01-15T12:19:13Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=c472c53d6ae8a80cc18659006f3df5fbcace7140'/>
<id>urn:sha1:c472c53d6ae8a80cc18659006f3df5fbcace7140</id>
<content type='text'>
Previously, we assumed that the serial number returned by hidapi
contains the Nitrokey serial number as the least significant bytes.  As
disussed here [0], this is not true for Nitrokey Pro devices with
firmware version 0.8 or older:  They write the serial number to the most
significant bytes instead.

This patch update the get_hidapi_serial_number function so that
list_devices now returns the correctly formatted and truncated serial
number for all Nitrokey Pro devices.  It also makes sure that the serial
number is lowercase to be consistent with libnitrokey’s formatting.
</content>
</entry>
<entry>
<title>Add the fill_sd_card function to Storage</title>
<updated>2020-01-14T15:53:52Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2020-01-14T15:15:40Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=2e543445c3059fa9decdbef718caf84696bb8786'/>
<id>urn:sha1:2e543445c3059fa9decdbef718caf84696bb8786</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>Add the get_operation_status function to the Storage struct</title>
<updated>2020-01-14T15:53:45Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2020-01-14T12:48:56Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=f266ea63039c87886f871b068ef3dcdf851a1eca'/>
<id>urn:sha1:f266ea63039c87886f871b068ef3dcdf851a1eca</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>Derive Clone, Copy, Debug, PartialEq for Status</title>
<updated>2020-01-14T15:53:35Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2020-01-14T15:18:02Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=eb04dafce313ff5349b1c93d8d87cb53ba320e7e'/>
<id>urn:sha1:eb04dafce313ff5349b1c93d8d87cb53ba320e7e</id>
<content type='text'>
Somehow I forgot to derive the common traits for the new Status struct.
This patch adds the missing derive attribute for Clone, Copy, Debug and
PartialEq.
</content>
</entry>
<entry>
<title>Add the get_sd_card_usage function to the Storage struct</title>
<updated>2020-01-14T11:06:23Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2020-01-14T11:00:15Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=73c8aebac338d3454d7e345ffd687324317077ec'/>
<id>urn:sha1:73c8aebac338d3454d7e345ffd687324317077ec</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>Rename Status::get_status to get_storage_status</title>
<updated>2020-01-11T19:26:40Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2020-01-11T19:13:22Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=6142752da1563c1ab873dc7069aeec72522cca99'/>
<id>urn:sha1:6142752da1563c1ab873dc7069aeec72522cca99</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>Add support for the GET_STATUS command</title>
<updated>2020-01-11T19:25:56Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2020-01-11T19:05:39Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=dbee55efa41496c8a683bfab96163facc93d6639'/>
<id>urn:sha1:dbee55efa41496c8a683bfab96163facc93d6639</id>
<content type='text'>
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
</content>
</entry>
<entry>
<title>Add the DeviceInfo struct</title>
<updated>2020-01-07T10:33:21Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-12-28T22:53:24Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=bcad061ed3e7777547c1b6fc9223dd65f752d94e'/>
<id>urn:sha1:bcad061ed3e7777547c1b6fc9223dd65f752d94e</id>
<content type='text'>
In the next patch, we will add support for the NK_list_devices functions
that returns a list of NK_device_info structs with information about the
connected devices.  This patch introduces the DeviceInfo struct that
holds the information returned by NK_list_devices and that can be
created from a NK_device_info struct.
</content>
</entry>
<entry>
<title>Implement conversion traits for Model and NK_device_model</title>
<updated>2020-01-07T10:33:14Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-12-28T22:34:58Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=6b439950c3c856f1b0eb6df2c9e89387b1697608'/>
<id>urn:sha1:6b439950c3c856f1b0eb6df2c9e89387b1697608</id>
<content type='text'>
A nitrokey_sys::NK_device_model (= u32) value may correspond to a
nitrokey::Model, and vice versa.  This patch adds the appropriate From
and TryFrom implementations.
</content>
</entry>
<entry>
<title>Simplify doc tests with results</title>
<updated>2019-12-27T22:08:29Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-12-27T22:08:29Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=4467ce7a2d1eedb320e92e5a26f1b93bc41d3611'/>
<id>urn:sha1:4467ce7a2d1eedb320e92e5a26f1b93bc41d3611</id>
<content type='text'>
Since Rust 1.34.0, we no longer need a `fn main` comment in doc tests
that return results.  It is sufficient to have an `Ok` return value with
type annotations.
</content>
</entry>
</feed>
