<feed xmlns='http://www.w3.org/2005/Atom'>
<title>nitrokey-rs/src, branch v0.4.0</title>
<subtitle>Rust interface to libnitrokey</subtitle>
<id>https://git.ireas.org/nitrokey-rs/atom?h=v0.4.0</id>
<link rel='self' href='https://git.ireas.org/nitrokey-rs/atom?h=v0.4.0'/>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/'/>
<updated>2019-12-27T22:08:29Z</updated>
<entry>
<title>Simplify doc tests with results</title>
<updated>2019-12-27T22:08:29Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-12-27T22:08:29Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=4467ce7a2d1eedb320e92e5a26f1b93bc41d3611'/>
<id>urn:sha1:4467ce7a2d1eedb320e92e5a26f1b93bc41d3611</id>
<content type='text'>
Since Rust 1.34.0, we no longer need a `fn main` comment in doc tests
that return results.  It is sufficient to have an `Ok` return value with
type annotations.
</content>
</entry>
<entry>
<title>Implement std::convert::TryFrom&lt;Config&gt; for RawConfig</title>
<updated>2019-12-27T22:07:56Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-12-27T22:07:56Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=c35a20f6c034e4d8aa1eeba3eef85429e09d95dc'/>
<id>urn:sha1:c35a20f6c034e4d8aa1eeba3eef85429e09d95dc</id>
<content type='text'>
Previously, the RawConfig struct had a try_from function.  As the
TryFrom trait has been stabilized with Rust 1.34.0, we can use it
instead.
</content>
</entry>
<entry>
<title>Replace rand_os::OsRng with rand_core::OsRng</title>
<updated>2019-12-27T22:07:26Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-12-27T22:07:26Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=0bffc7931e011b4c0c046ed7608fbe9b7a1ffd19'/>
<id>urn:sha1:0bffc7931e011b4c0c046ed7608fbe9b7a1ffd19</id>
<content type='text'>
rand_os::OsRng has been deprecated.  Instead we can use rand_core with
the getrandom feature.
</content>
</entry>
<entry>
<title>Refactor the device module into submodules</title>
<updated>2019-07-16T09:15:35Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-07-16T09:14:36Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=678f0b700666a4ba86db2180078d79a730dc82e0'/>
<id>urn:sha1:678f0b700666a4ba86db2180078d79a730dc82e0</id>
<content type='text'>
This patch splits the rather large device module into the submodules
pro, storage and wrapper.  This only changes the internal code structure
and does not affect the public API.
</content>
</entry>
<entry>
<title>Update rand_{core,os} dependencies</title>
<updated>2019-07-16T09:00:20Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-07-16T08:58:37Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=6c138eaa850c745b97b7e48a201db0cbaad8e1e0'/>
<id>urn:sha1:6c138eaa850c745b97b7e48a201db0cbaad8e1e0</id>
<content type='text'>
This patch updates the rand_core dependency to version 0.5 and the
rand_os dependency to version 0.2.  This causes a change in util.rs:
Instead of constructing an OsRng instance using OsRng::new(), we can
directly instantiate the (now empty) struct.
</content>
</entry>
<entry>
<title>Add force_take function to ignore poisoned cache</title>
<updated>2019-07-09T10:47:26Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-07-09T10:44:45Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=5e8f0fbaf6df0cb919e4b02401cc21d5280bf09c'/>
<id>urn:sha1:5e8f0fbaf6df0cb919e4b02401cc21d5280bf09c</id>
<content type='text'>
The take and take_blocking functions return a PoisonError if the cache
is poisoned, i. e. if a thread panicked while holding the manager.  This
is a sensible default behaviour, but for example during testing, one
might want to ignore the poisoned cache.  This patch adds the force_take
function that unwraps the PoisonError and returns the cached Manager
even if the cache was poisoned.
</content>
</entry>
<entry>
<title>Remove allow(deprecated) attribute for in lib.rs</title>
<updated>2019-07-09T10:23:14Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-07-09T10:22:08Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=88b32f5c2187e59fece93cd245aeadb4e5f9e04a'/>
<id>urn:sha1:88b32f5c2187e59fece93cd245aeadb4e5f9e04a</id>
<content type='text'>
During the connection manager refactoring, we temporarily used
deprecated methods.  This is no longer the case, so we can remove the
allow(deprecated) attribute.
</content>
</entry>
<entry>
<title>Update documentation for Manager refactoring</title>
<updated>2019-07-09T08:44:08Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-01-27T19:52:53Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=62e8ee8f5d02511d6eb5dc179b087b04e88c1b94'/>
<id>urn:sha1:62e8ee8f5d02511d6eb5dc179b087b04e88c1b94</id>
<content type='text'>
This patch updates the documentation to reflect the latest changes to
connection handling.  It also updates the doc tests to prefer the new
methods over the old ones.
</content>
</entry>
<entry>
<title>Introduce into_manager for Device</title>
<updated>2019-07-09T08:27:55Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-07-09T08:09:02Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=12fa62483cf45d868099d5d4020333af492eebde'/>
<id>urn:sha1:12fa62483cf45d868099d5d4020333af492eebde</id>
<content type='text'>
To enable applications like nitrokey-test to go back to a manager
instance from a Device instance, we add the into_manager function to the
Device trait.  To do that, we have to keep track of the Manager’s
lifetime by adding a lifetime to Device (and then to some other traits
that use Device).
</content>
</entry>
<entry>
<title>Store mutable reference to Manager in Device</title>
<updated>2019-07-08T21:40:17Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-01-27T18:42:14Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=fe2f39826ade5a156945dabb8c8ab725378a15c1'/>
<id>urn:sha1:fe2f39826ade5a156945dabb8c8ab725378a15c1</id>
<content type='text'>
In the last patches, we ensured that devices can only be obtained using
the Manager struct.  But we did not ensure that there is only one device
at a time.  This patch adds a mutable reference to the Manager instance
to the Device implementations.  The borrow checker makes sure that there
is only one mutable reference at a time.

In this patch, we have to remove the old connect, Pro::connect and
Storage::connect functions as they do no longer compile.  (They discard
the MutexGuard which invalidates the reference to the Manager.)
Therefore the tests do no longer compile.
</content>
</entry>
</feed>
