<feed xmlns='http://www.w3.org/2005/Atom'>
<title>nitrokey-rs/src, branch v0.4.0-alpha.3</title>
<subtitle>Rust interface to libnitrokey</subtitle>
<id>https://git.ireas.org/nitrokey-rs/atom?h=v0.4.0-alpha.3</id>
<link rel='self' href='https://git.ireas.org/nitrokey-rs/atom?h=v0.4.0-alpha.3'/>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/'/>
<updated>2019-07-09T10:47:26Z</updated>
<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>
<entry>
<title>Move {Pro, Storage}::connect into Manager</title>
<updated>2019-07-08T21:33:13Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-01-27T18:21:08Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=379bc798477a1de7ffda923c5d10ca63aebae25f'/>
<id>urn:sha1:379bc798477a1de7ffda923c5d10ca63aebae25f</id>
<content type='text'>
As part of the connection refactoring, this patch moves the connect
methods of the Pro and Storage structs into the Manager struct.  To
maintain compatibility with nitrokey-test, the old methods are not
removed but marked as deprecated.
</content>
</entry>
<entry>
<title>Move the connect_model function into Manager</title>
<updated>2019-07-08T21:31:40Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-01-27T18:07:59Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=bd7c7a5fdf0ae66a1ff2f00beb5ed4c2e6994ca1'/>
<id>urn:sha1:bd7c7a5fdf0ae66a1ff2f00beb5ed4c2e6994ca1</id>
<content type='text'>
As part of the connection refactoring, this patch moves the
connect_model function to the Manager struct.  As the connect_model
function is not used by nitrokey-test, it is removed.
</content>
</entry>
<entry>
<title>Move the connect function into Manager</title>
<updated>2019-07-08T21:27:11Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-01-27T17:44:59Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=54d23475aa3b712a539bad129fe37223173268f2'/>
<id>urn:sha1:54d23475aa3b712a539bad129fe37223173268f2</id>
<content type='text'>
As part of the connection refactoring, we replace the connect function
with the Manager::connect method.  To maintain compatibility with
nitrokey-test, the connect function is not removed but marked as
deprecated.
</content>
</entry>
<entry>
<title>Add Manager struct to manage Nitrokey connections</title>
<updated>2019-07-08T21:27:11Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-01-27T15:43:32Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=588066f415e956fdcd2c6f6216c52b25911a3b1d'/>
<id>urn:sha1:588066f415e956fdcd2c6f6216c52b25911a3b1d</id>
<content type='text'>
As part of the connection refactoring, we introduce the Manager struct
that deals with connection management.  To make sure there can be only
once instance of the manager, we add a global static Mutex that holds
the single Manager instance.  We use the struct to ensure that the user
can only connect to one device at a time.

This also changes the Error::PoisonError variant to store the
sync::PoisonError.  This allows the user to call into_inner on the
PoisonError to retrieve the MutexGuard and to ignore the error (for
example useful during testing).
</content>
</entry>
<entry>
<title>Add ConcurrentAccessError and PoisonError variants</title>
<updated>2019-07-08T21:27:03Z</updated>
<author>
<name>Robin Krahl</name>
<email>robin.krahl@ireas.org</email>
</author>
<published>2019-01-27T15:04:19Z</published>
<link rel='alternate' type='text/html' href='https://git.ireas.org/nitrokey-rs/commit/?id=a52676d9577f587e0f4d8e47ddc71ba34f0b31ca'/>
<id>urn:sha1:a52676d9577f587e0f4d8e47ddc71ba34f0b31ca</id>
<content type='text'>
This patch prepares the refactoring of the connection methods by
introducing the Error variants ConcurrentAccessError and PoisonError.
ConcurrentAccessError indicates that the user tried to connect to
obtain a token that is currently locked, and PoisonError indicates that
a lock has been poisoned, i. e. a thread panicked while accessing using
a token.
</content>
</entry>
</feed>
