<feed xmlns='http://www.w3.org/2005/Atom'>
<title>nitrokey-rs/tests, branch v0.4.0-alpha.2</title>
<subtitle>Rust interface to libnitrokey</subtitle>
<id>https://git.ireas.org/nitrokey-rs/atom?h=v0.4.0-alpha.2</id>
<link rel='self' href='https://git.ireas.org/nitrokey-rs/atom?h=v0.4.0-alpha.2'/>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/'/>
<updated>2019-02-05T14:52:54Z</updated>
<entry>
<title>Revert "Store mutable reference to Device in PasswordSafe"</title>
<updated>2019-02-05T14:52:54Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-02-05T12:48:01Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=d95355e3d76c0c0022629e635f36a2dc325c0af2'/>
<id>urn:sha1:d95355e3d76c0c0022629e635f36a2dc325c0af2</id>
<content type='text'>
This reverts commit 13006c00dcbd570cf8347d89557834e320427377.
</content>
</entry>
<entry>
<title>Revert "Refactor User and Admin to use a mutable reference"</title>
<updated>2019-02-05T14:48:24Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-02-05T12:47:24Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=83641ca0518e4c766c63e40d0787e4f0b436652a'/>
<id>urn:sha1:83641ca0518e4c766c63e40d0787e4f0b436652a</id>
<content type='text'>
This reverts commit 0972bbe82623c3d9649b6023d8f50d304aa0cde6.
</content>
</entry>
<entry>
<title>Remove PIN constants from tests</title>
<updated>2019-02-04T00:30:25Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-02-04T00:29:11Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=606177a61de39ba5e96390d63cff536f895d8c39'/>
<id>urn:sha1:606177a61de39ba5e96390d63cff536f895d8c39</id>
<content type='text'>
In a previous commit, we introduced the DEFAULT_{ADMIN,USER}_PIN
constants.  Therefore we no longer need in the {ADMIN,USER}_PASSWORD
constants in the util module for the tests.
</content>
</entry>
<entry>
<title>Refactor User and Admin to use a mutable reference</title>
<updated>2019-02-02T10:25:02Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-01-28T14:24:12Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=0972bbe82623c3d9649b6023d8f50d304aa0cde6'/>
<id>urn:sha1:0972bbe82623c3d9649b6023d8f50d304aa0cde6</id>
<content type='text'>
In the initial nitrokey-rs implementation, the Admin and the User struct
take the Device by value to make sure that the user cannot initiate a
second authentication while this first is still active (which would
invalidate the temporary password).  Now we realized that this is not
necessary – taking a mutable reference has the same effect, but leads to
a much cleaner API.

This patch refactors the Admin and User structs – and all dependent code
– to use a mutable reference instead of a Device value.
</content>
</entry>
<entry>
<title>Require mutable reference if method changes device state</title>
<updated>2019-02-02T10:25:02Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-01-28T12:27:15Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=f49e61589e32217f97c94aa86d826f6b65170fba'/>
<id>urn:sha1:f49e61589e32217f97c94aa86d826f6b65170fba</id>
<content type='text'>
Previously, all methods that access a Nitrokey device took a reference
to the device as input.  This method changes methods that change the
device state to require a mutable reference instead.  In most case,
this is straightforward as the method writes data to the device (for
example write_config or change_user_pin).  But there are two edge cases:
- Authenticating with a PIN changes the device state as it may decrease
  the PIN retry counter if the authentication fails.
- Generating an HOTP code changes the device state as it increases the
  HOTP counter.
</content>
</entry>
<entry>
<title>Add set_encrypted_volume_mode method to Storage</title>
<updated>2019-01-31T11:10:38Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-01-31T11:07:50Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=ad76653b3be57c0cfd31c8056a8d68537034324e'/>
<id>urn:sha1:ad76653b3be57c0cfd31c8056a8d68537034324e</id>
<content type='text'>
Previously, we considered this command as unsupported as it only was
available with firmware version 0.49.  But as discussed in nitrocli
issue 80 [0], it will probably be re-enabled in future firmware
versions.  Therefore this patch adds the set_encrypted_volume_mode to
Storage.

[0] https://github.com/d-e-s-o/nitrocli/issues/80
</content>
</entry>
<entry>
<title>Add assert_any_ok macro to unit tests</title>
<updated>2019-01-28T19:48:33Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-01-28T19:45:40Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=d1262390573b758ac4aa610eff96a1b5dcb9f3d6'/>
<id>urn:sha1:d1262390573b758ac4aa610eff96a1b5dcb9f3d6</id>
<content type='text'>
Sometimes we cannot use assert_ok! as we can’t compare the Ok value (or
do not want to).  For these cases, this patch adds the new assert_any_ok
macro to use instead of assert!(x.is_ok()).  The advantage is that the
error information is not discarded but printed in a helpful error
message.
</content>
</entry>
<entry>
<title>Add unwrap_ok macro to replace unwrap in unit tests</title>
<updated>2019-01-28T19:40:49Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-01-28T19:40:49Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=52df93249f27ae803bada0451d7380bc3d596007'/>
<id>urn:sha1:52df93249f27ae803bada0451d7380bc3d596007</id>
<content type='text'>
The unwrap error message is not very useful.  This patch adds the
unwrap_ok macro that is basically the same as unwrap but prints a more
readable error message.
</content>
</entry>
<entry>
<title>Accept UTF-8 errors in password safe tests</title>
<updated>2019-01-28T19:21:41Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-01-27T22:40:07Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=5d7bb087707915a78149da7492cccd772db2657e'/>
<id>urn:sha1:5d7bb087707915a78149da7492cccd772db2657e</id>
<content type='text'>
After a factory reset or after building the AES key, the password safe
contains garbage data.  This will most likely not be valid UTF-8.
Therefore we change the tests to also accept an UTF-8 error in these
cases.
</content>
</entry>
<entry>
<title>Add get_firmware_version method</title>
<updated>2019-01-27T23:36:53Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-01-27T23:34:04Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=1d68e24db4078ad1a004afd7bec90a81e7d31ec8'/>
<id>urn:sha1:1d68e24db4078ad1a004afd7bec90a81e7d31ec8</id>
<content type='text'>
This patch combines the get_{major,minor}_firmware_version methods into
the new get_firmware_version method that returns a FirmwareVersion
struct.  Currently, this requires casting from i32 to u8.  But this will
be fixed with the next libnitrokey version as we change the return types
for the firmware getters.
</content>
</entry>
</feed>
