aboutsummaryrefslogtreecommitdiff
path: root/Cargo.toml
diff options
context:
space:
mode:
authorRobin Krahl <robin.krahl@ireas.org>2019-01-27 15:43:32 +0000
committerRobin Krahl <robin.krahl@ireas.org>2019-07-08 21:27:11 +0000
commit588066f415e956fdcd2c6f6216c52b25911a3b1d (patch)
treeb16014285812bf8286a6f76800c978f8da864486 /Cargo.toml
parenta52676d9577f587e0f4d8e47ddc71ba34f0b31ca (diff)
downloadnitrokey-rs-588066f415e956fdcd2c6f6216c52b25911a3b1d.tar.gz
nitrokey-rs-588066f415e956fdcd2c6f6216c52b25911a3b1d.tar.bz2
Add Manager struct to manage Nitrokey connections
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).
Diffstat (limited to 'Cargo.toml')
-rw-r--r--Cargo.toml1
1 files changed, 1 insertions, 0 deletions
diff --git a/Cargo.toml b/Cargo.toml
index d26bd88..7daadd1 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -17,6 +17,7 @@ license = "MIT"
exclude = [".builds/*"]
[dependencies]
+lazy_static = "1.2.0"
libc = "0.2"
nitrokey-sys = "3.5"
rand_core = {version = "0.3", default-features = false, features = ["std"] }