<feed xmlns='http://www.w3.org/2005/Atom'>
<title>nitrokey-rs/src, 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-28T20:05:33Z</updated>
<entry>
<title>Regenerate temporary passwords with null bytes</title>
<updated>2020-01-28T20:05:33Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2020-01-28T19:31:56Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=ebd754d88330478981f65e4724cc561ceff4f9e7'/>
<id>urn:sha1:ebd754d88330478981f65e4724cc561ceff4f9e7</id>
<content type='text'>
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
byte.

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.
</content>
</entry>
<entry>
<title>Remove AuthenticatedDevice::temp_password_ptr</title>
<updated>2020-01-28T20:05:13Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2020-01-28T18:47:39Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=777cbd0fee8187325b0272d3264b535828d4b4ea'/>
<id>urn:sha1:777cbd0fee8187325b0272d3264b535828d4b4ea</id>
<content type='text'>
We introduced the AuthenticatedDevice::temp_password_ptr function to
reduce the number of casts needed in our code base.  Since we switched
from Vec&lt;u8&gt; to CString, we no longer have to cast the return value of
as_ptr.  Therefore we can remove the temp_password_ptr function to
reduce code complexity.
</content>
</entry>
<entry>
<title>Use CString to store temporary passwords</title>
<updated>2020-01-28T20:05:03Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2020-01-28T18:42:41Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=669fbb40d894460e9603dcf6e953373e53a19347'/>
<id>urn:sha1:669fbb40d894460e9603dcf6e953373e53a19347</id>
<content type='text'>
This patch changes the generate_password function and the User and Admin
structs to use a CString instead of a Vec&lt;u8&gt; when storing temporary
passwords.  This makes sure that the strings that are passed to the C
API are properly null-terminated.
</content>
</entry>
<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>Document background operations</title>
<updated>2020-01-14T15:54:00Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2020-01-14T15:33:11Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=bfe261bd3e2517021bad36612889c44a8b2327dd'/>
<id>urn:sha1:bfe261bd3e2517021bad36612889c44a8b2327dd</id>
<content type='text'>
This patch adds a new section about background operations to the crate
documentation.
</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>
</feed>
