<feed xmlns='http://www.w3.org/2005/Atom'>
<title>nitrokey-rs, branch v0.7.0</title>
<subtitle>Rust interface to libnitrokey</subtitle>
<id>https://git.ireas.org/nitrokey-rs/atom?h=v0.7.0</id>
<link rel='self' href='https://git.ireas.org/nitrokey-rs/atom?h=v0.7.0'/>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/'/>
<updated>2020-07-14T19:53:02Z</updated>
<entry>
<title>Release v0.7.0</title>
<updated>2020-07-14T19:53:02Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2020-07-14T19:52:06Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=8f72f038cab8e61fb162c12c4bd4cbaa243faa2d'/>
<id>urn:sha1:8f72f038cab8e61fb162c12c4bd4cbaa243faa2d</id>
<content type='text'>
This release changes the Error enum to implement Send, Sync and 'static
for compatibility with error handling crates like anyhow.
</content>
</entry>
<entry>
<title>Merge branch 'poison-error' into next</title>
<updated>2020-07-14T19:43:37Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2020-07-14T19:43:37Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=d0f517eec5fbeb402a42eb2b23ca13fc85f1bc98'/>
<id>urn:sha1:d0f517eec5fbeb402a42eb2b23ca13fc85f1bc98</id>
<content type='text'>
This patch series refactors the Error enum and ensures that it is Send,
Sync and 'static.  This makes sure that it is compatible with the anyhow
crate.  To achieve this, we drop the RandError variant and remove the
sync::PoisonError value from the PoisonError variant.
</content>
</entry>
<entry>
<title>Ensure Error trait implementations</title>
<updated>2020-07-08T21:03:02Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2020-07-08T20:58:41Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=f1e83eb81879412e1de9898238ba58289bb6cb24'/>
<id>urn:sha1:f1e83eb81879412e1de9898238ba58289bb6cb24</id>
<content type='text'>
The anyhow crate requires that error types are error::Error, Send, Sync
and 'static.  This patch implements a simple static assertion that our
Error type implements these traits.
</content>
</entry>
<entry>
<title>Remove Error::RandError variant</title>
<updated>2020-07-08T21:02:56Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2020-07-08T20:22:10Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=3f402dc13530ce4de167bae843200cfbd72ed69b'/>
<id>urn:sha1:3f402dc13530ce4de167bae843200cfbd72ed69b</id>
<content type='text'>
Since we update rand_os to version 0.2 in commit
6c138eaa850c745b97b7e48a201db0cbaad8e1e0, the random number generation
can no longer fail.  Therefore the Error::RandError variant is no longer
needed.

As we did not want to break the public API, we still kept the RandError
variant.  This patch removes the RandError variant for good.
</content>
</entry>
<entry>
<title>Remove sync::PoisonError from Error::PoisonError</title>
<updated>2020-07-08T21:02:49Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2020-07-08T10:08:26Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=98232c7bc262dd3902b8f3e299196ab9c83fb355'/>
<id>urn:sha1:98232c7bc262dd3902b8f3e299196ab9c83fb355</id>
<content type='text'>
Previously, the Error::PoisonError contained the sync::PoisonError that
caused the error.  This is problematic as sync::PoisonError does not
implement Send, making it impossible to use the Error enum with the
anyhow crate.  At the same time, storing the sync::PoisonError is not
very useful.  If a user wants to access the poisoned lock, they can call
the force_take function.

Therefore we remove the sync::PoisonError value from the Error::
PoisonError variant.  This also allows us to simplify the
From&lt;sync::PoisonError&lt;…&gt;&gt; and From&lt;sync::TryLockError&lt;…&gt;&gt;
implementations as we no longer need to know the type of the mutex that
caused the error.

For more information, see this thread:
	https://lists.sr.ht/~ireas/nitrokey-rs-dev/%3C68ed0f3f-d98f-63bc-04d2-81b6d6cde560%40posteo.net%3E
</content>
</entry>
<entry>
<title>Use find(…) instead of skip_while(…).next()</title>
<updated>2020-07-08T21:02:43Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2020-07-08T10:25:31Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=cf460cbb5e616d12f5e6b1f64acddf3ec0e7b087'/>
<id>urn:sha1:cf460cbb5e616d12f5e6b1f64acddf3ec0e7b087</id>
<content type='text'>
This patch replaces calls to skip_while(…).next() for an iter::Iterator
with a call to find(…), as suggested by clippy.
</content>
</entry>
<entry>
<title>Remove unused imports</title>
<updated>2020-07-08T21:02:34Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2020-07-08T10:18:41Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=9f80512a11926c5ec3f869ad5e220b3b350eec9a'/>
<id>urn:sha1:9f80512a11926c5ec3f869ad5e220b3b350eec9a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Merge branch 'release-0.6.0' into next</title>
<updated>2020-02-03T11:59:49Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2020-02-03T11:59:49Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=e313998a1c654573add92c8a71a0c3a0cf22ece9'/>
<id>urn:sha1:e313998a1c654573add92c8a71a0c3a0cf22ece9</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Release v0.6.0</title>
<updated>2020-02-03T11:55:52Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2020-02-03T11:55:52Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=2a8ce725407f32db5ad61c37475719737c9b5c9c'/>
<id>urn:sha1:2a8ce725407f32db5ad61c37475719737c9b5c9c</id>
<content type='text'>
This release introduces a new struct SerialNumber that represents the
serial number of a Nitrokey device, replacing the strings we used
previously.
</content>
</entry>
<entry>
<title>Refactor string handling in util</title>
<updated>2020-02-03T10:31:21Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2020-01-28T16:56:53Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=d905aafe208536203dd319e5dc48bd250180a8ef'/>
<id>urn:sha1:d905aafe208536203dd319e5dc48bd250180a8ef</id>
<content type='text'>
The util module provides helper methods to deal with the C strings
returned by libnitrokey.  The current implementation has to problems:
- It causes unnecessary allocations if we only want to look at the
  string, for example in get_serial_number.
- If the conversion from a CStr to a String fails, the string pointer
  is not freed.

Therefore this patch introduces the run_with_str function that executes
a function with the string returned by libnitrokey and then makes sure
that the pointer is freed correctly.
</content>
</entry>
</feed>
