<feed xmlns='http://www.w3.org/2005/Atom'>
<title>nitrokey-rs/src, branch v0.3.4</title>
<subtitle>Rust interface to libnitrokey</subtitle>
<id>https://git.ireas.org/nitrokey-rs/atom?h=v0.3.4</id>
<link rel='self' href='https://git.ireas.org/nitrokey-rs/atom?h=v0.3.4'/>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/'/>
<updated>2019-01-20T13:58:11Z</updated>
<entry>
<title>Pass temporary password as *const c_char</title>
<updated>2019-01-20T13:58:11Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-01-20T13:54:20Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=9e97ffad01e1b81c87f2926bd7bab823219b07c7'/>
<id>urn:sha1:9e97ffad01e1b81c87f2926bd7bab823219b07c7</id>
<content type='text'>
The random number generator used for the temporary password produces a
Vec&lt;u8&gt;.  The libnitrokey functions using the temporary password require
a pointer to a c_char.  Previously, we cast the u8 pointer to the
Vec&lt;u8&gt; to a i8 pointer (unsigned to signed).  This leads to a type
mismatch if the char type is not signed.  Therefore we now cast to
c_char instead of i8.
</content>
</entry>
<entry>
<title>Document and test empty Git versions</title>
<updated>2019-01-16T20:29:38Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-01-16T20:28:31Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=679791064169a37ad9d88b910b7553ebf7133c07'/>
<id>urn:sha1:679791064169a37ad9d88b910b7553ebf7133c07</id>
<content type='text'>
If libnitrokey has not been built from a clone of the Git repository,
the Git version string may be empty.
</content>
</entry>
<entry>
<title>pws: Interpret empty strings as unprogrammed slots</title>
<updated>2019-01-16T19:17:16Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-01-16T03:16:01Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=79a3298ab5973a47cb68ef48e554ec88fb7e99a6'/>
<id>urn:sha1:79a3298ab5973a47cb68ef48e554ec88fb7e99a6</id>
<content type='text'>
Until the last commit, all empty strings returned by the library were
interepreted as errors.  As the PWS functions return empty strings for
unprogrammed slots, the methods to access the PWS data returned an error
when querying a slot that is not programmed.  Since the last commit,
they return an empty string instead.

This patch restores the old behavior by returning an error instead of an
empty string.  Yet we change the error variant: SlotNotProgrammed
instead of Undefined.
</content>
</entry>
<entry>
<title>Fix result_from_string for empty return values</title>
<updated>2019-01-16T19:17:07Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-01-16T02:52:58Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=3c8092cd937d6f449b1959eab9e7e15549970d85'/>
<id>urn:sha1:3c8092cd937d6f449b1959eab9e7e15549970d85</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>Fix typo: destory -&gt; destroy</title>
<updated>2019-01-16T01:45:25Z</updated>
<author>
<name>Daniel Mueller</name>
<email>deso@posteo.net</email>
</author>
<published>2019-01-16T01:15:34Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=7c2bb330b125cde7ceb55616b3d8c50a98840c58'/>
<id>urn:sha1:7c2bb330b125cde7ceb55616b3d8c50a98840c58</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Use rand_os for random data generation</title>
<updated>2019-01-14T19:30:59Z</updated>
<author>
<name>Daniel Mueller</name>
<email>deso@posteo.net</email>
</author>
<published>2019-01-14T18:35:52Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=77aa0e51962880c170d924fa735f2268772a0652'/>
<id>urn:sha1:77aa0e51962880c170d924fa735f2268772a0652</id>
<content type='text'>
The rand crate comes with a slew of dependencies to cover all sort of
randomness related tasks in various scenarios. However, this crate
really only requires a tiny subset of this functionality. As it turns
out, this core functionality is provided by the rand_os crate.

This change drops the dependency to rand in favor of rand_os. In order
to accomplish that, it brings back the RngError variant for the
CommandError enum to capture the possibility of the creation of the
random number generator failing.
</content>
</entry>
<entry>
<title>Add the clear_new_sd_card_warning method to Storage</title>
<updated>2019-01-14T17:37:07Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-01-14T17:34:34Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=c34b56b2b4c317947fd8fd3ae6c1fa3a773ee775'/>
<id>urn:sha1:c34b56b2b4c317947fd8fd3ae6c1fa3a773ee775</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>Add the get_production_info method to the Storage struct</title>
<updated>2019-01-14T15:28:58Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-01-14T15:26:02Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=0262ed2e614e9222b69970289a32ddb3683b3535'/>
<id>urn:sha1:0262ed2e614e9222b69970289a32ddb3683b3535</id>
<content type='text'>
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
</content>
</entry>
<entry>
<title>Add export_firmware method to Storage</title>
<updated>2019-01-12T17:39:10Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-01-12T17:37:21Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=78f926456a07047c34dc20b97fe04e55ba443528'/>
<id>urn:sha1:78f926456a07047c34dc20b97fe04e55ba443528</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>Add set_unencrypted_volume_mode to Storage</title>
<updated>2019-01-12T17:16:39Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-01-12T16:51:47Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=0ee7ef7705ebfc0d419bba9a61db55fccd14b638'/>
<id>urn:sha1:0ee7ef7705ebfc0d419bba9a61db55fccd14b638</id>
<content type='text'>
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.)
</content>
</entry>
</feed>
