<feed xmlns='http://www.w3.org/2005/Atom'>
<title>nitrokey-rs/tests, branch v0.4.0-alpha.0</title>
<subtitle>Rust interface to libnitrokey</subtitle>
<id>https://git.ireas.org/nitrokey-rs/atom?h=v0.4.0-alpha.0</id>
<link rel='self' href='https://git.ireas.org/nitrokey-rs/atom?h=v0.4.0-alpha.0'/>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/'/>
<updated>2019-01-25T19:22:28Z</updated>
<entry>
<title>Add tolerance for timing issues to the TOTP tests</title>
<updated>2019-01-25T19:22:28Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-01-25T19:19:36Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=6dfc1a2929313e24ea03e78b486b72f7b1c1e5ec'/>
<id>urn:sha1:6dfc1a2929313e24ea03e78b486b72f7b1c1e5ec</id>
<content type='text'>
The TOTP test with the timestamp 59 often fails as the Nitrokey’s clock
ticks between setting the time and generating the TOTP code.  This patch
also allows the TOTP code for timestamp 60 for this test case.
</content>
</entry>
<entry>
<title>Add license and copyright information</title>
<updated>2019-01-23T15:33:26Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-01-23T15:33:26Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=fdb7bac3063e62776bfc13f184cf786da19f42d1'/>
<id>urn:sha1:fdb7bac3063e62776bfc13f184cf786da19f42d1</id>
<content type='text'>
This patch adds license and copyright information to all files to make
nitrokey-rs compliant with the REUSE practices [0].

[0] https://reuse.software/practices/2.0/
</content>
</entry>
<entry>
<title>Refactor device::config test case</title>
<updated>2019-01-23T04:57:11Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-01-23T04:56:43Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=35fd6be074cd16796f701770845ade471e2c13bd'/>
<id>urn:sha1:35fd6be074cd16796f701770845ade471e2c13bd</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Return UTF-8 error if libnitrokey returns an invalid string</title>
<updated>2019-01-23T04:30:23Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-01-23T04:27:14Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=d4663961c41a0fb6f81f4a54aefd0fedce49d350'/>
<id>urn:sha1:d4663961c41a0fb6f81f4a54aefd0fedce49d350</id>
<content type='text'>
Previously, we used lossy UTF-8 conversion.  Yet the user should be
notified if we have a problem instead of silently changing the data.
Therefore, we now return an error if we enocunter an invalid UTF-8
string.  This leads to a change in `get_library_version`’s signature.
</content>
</entry>
<entry>
<title>Fix formatting in tests</title>
<updated>2019-01-20T21:36:27Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-01-20T21:35:19Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=07bb11fec9de6579ffaa8d128796f242f818292f'/>
<id>urn:sha1:07bb11fec9de6579ffaa8d128796f242f818292f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Check specific error codes in the tests</title>
<updated>2019-01-20T21:15:29Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-01-17T14:21:44Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=d87859975dc158919ecd5bf11a1111a2da5fcb30'/>
<id>urn:sha1:d87859975dc158919ecd5bf11a1111a2da5fcb30</id>
<content type='text'>
If possible, check specific error codes instead of `is_err()`.  This
makes the code more readable and catches bugs resulting in the wrong
error code.  Also, using the assert_*_err and assert_ok macros yields
error messages containing the expected and the actual value.

To be able to use these macros with the `get_password_safe` method, we
also have to implement `Debug` for `PasswordSafe` and `Device`.
</content>
</entry>
<entry>
<title>Introduce the Error::UnexpectedError variant</title>
<updated>2019-01-20T21:08:52Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-01-17T13:38:28Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=c191e875492ff8aeab1b4493b87486cd265f0edc'/>
<id>urn:sha1:c191e875492ff8aeab1b4493b87486cd265f0edc</id>
<content type='text'>
The UnexpectedError variant is used when a libnitrokey function returns
a value that violates the function’s contract, for example if a function
returns a null pointer although it guarantees to never return null.
Previously, we returned a CommandError::Unspecified in these cases.
</content>
</entry>
<entry>
<title>Refactor library errors into LibraryError enum</title>
<updated>2019-01-20T21:08:50Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-01-17T12:47:52Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=5e258d26b55af6bed7c316b1c7ac12e20946702d'/>
<id>urn:sha1:5e258d26b55af6bed7c316b1c7ac12e20946702d</id>
<content type='text'>
Previously, library errors were part of the CommandError enum.  As
command errors and library errors are two different error types, they
should be split into two enums.
</content>
</entry>
<entry>
<title>Move the CommandError::Unknown to Error</title>
<updated>2019-01-20T21:08:26Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-01-17T04:15:31Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=944e1fa0d51e547dde2a9368d2b8431b109f63c4'/>
<id>urn:sha1:944e1fa0d51e547dde2a9368d2b8431b109f63c4</id>
<content type='text'>
An error code can not only indiciate a command error, but also a library
or device communication error.  Therefore, the variant for an unknown
error code should be placed in the top-level Error enum instead of the
CommandError enum.
</content>
</entry>
<entry>
<title>Add assert_cmd_err and assert_ok macros to tests</title>
<updated>2019-01-20T21:08:26Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-01-17T03:49:13Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=c43b63b70ee32f9fa8e980d89eff5383931f5c39'/>
<id>urn:sha1:c43b63b70ee32f9fa8e980d89eff5383931f5c39</id>
<content type='text'>
These macros allow easier comparisions using the new error type.  This
patch fixes all tests and updates nitrokey-test to 0.2.0 so that it
integrates with the new error structure.

Some tests may still fail until CommunicationError::NotConnected is
actually returned.
</content>
</entry>
</feed>
