<feed xmlns='http://www.w3.org/2005/Atom'>
<title>nitrokey-rs/tests, branch next</title>
<subtitle>Rust interface to libnitrokey</subtitle>
<id>https://git.ireas.org/nitrokey-rs/atom?h=next</id>
<link rel='self' href='https://git.ireas.org/nitrokey-rs/atom?h=next'/>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/'/>
<updated>2020-09-06T17:22:33Z</updated>
<entry>
<title>Fix serial number check in device tests</title>
<updated>2020-09-06T17:22:33Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2020-09-06T17:22:33Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=c2a12ff793a0366cefc3d6a917a16f07ff0aadc7'/>
<id>urn:sha1:c2a12ff793a0366cefc3d6a917a16f07ff0aadc7</id>
<content type='text'>
The serial numuer check in the device tests are different for Storage
devices because the Nitrokey Storage currently does not report its
serial number in the status.  Our previous implementation matched the
model to determine how to check the serial number.  This no longer works
as we marked the model as non-exhaustive and was unnecessary.  This
patch changes the test logic to perform the serial number test for all
devices except the Nitrokey Storage.
</content>
</entry>
<entry>
<title>Represent serial numbers using SerialNumber struct</title>
<updated>2020-02-03T10:30:57Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2020-01-28T16:38:47Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=4fb865af37093d9b0ee039d8ae48fb2a820f3760'/>
<id>urn:sha1:4fb865af37093d9b0ee039d8ae48fb2a820f3760</id>
<content type='text'>
In a previous commit, we changed the serial number representation from a
string to an integer.  This made it easier to compare serial numbers,
but also introduced new problems:
- Serial numbers should be formatted consistently, for example as
  "{:#010x}".  It is hard to ensure this for an integer value.
- The format of the serial number may be subject to change.  Users
  should not rely too much on the u32 representation.

Therefore we introduce a new SerialNumber struct that represents a
serial number.  Currently it only stores a u32 value.  The following
traits and functions can be used to access its value:
- FromStr for string parsing
- ToString/Display for string formatting
- as_u32 to access the underlying integer value
</content>
</entry>
<entry>
<title>Always store serial numbers as integers</title>
<updated>2020-01-28T11:02:28Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2020-01-26T13:26:01Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=24eebcdaaa32d55bf49d069d8320be5dbd6fdab9'/>
<id>urn:sha1:24eebcdaaa32d55bf49d069d8320be5dbd6fdab9</id>
<content type='text'>
This patch consistently uses u32 integers to store and return the serial
number of a Nitrokey device.  This makes it easier to convert and
compare the serial number, as it is a unique representation and as
formatting an integer cannot fail.  For more details, see this RFC:
	https://lists.sr.ht/~ireas/nitrokey-rs-dev/%3C20200126074816.GA1314%40ireas.org%3E
</content>
</entry>
<entry>
<title>Add String value to the Error::UnexpectedError variant</title>
<updated>2020-01-28T10:54:20Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2020-01-28T09:07:23Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=da8727996efacec4280696caefee3feecea4eae7'/>
<id>urn:sha1:da8727996efacec4280696caefee3feecea4eae7</id>
<content type='text'>
To make debugging of unexpected errors easier, this patch adds an
associated String value with a description of the unexpected behavior to
the UnexpectedError variant of the Error enum.
</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>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 connect_path function to the Manager struct</title>
<updated>2020-01-07T10:33:34Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-12-29T12:15:04Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=97c772724dd1fe395e7154e0d71c3b2408436082'/>
<id>urn:sha1:97c772724dd1fe395e7154e0d71c3b2408436082</id>
<content type='text'>
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.
</content>
</entry>
</feed>
