aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md9
-rw-r--r--Cargo.toml8
-rw-r--r--src/util.rs3
3 files changed, 11 insertions, 9 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3051d0f..41e46a6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -38,9 +38,12 @@ SPDX-License-Identifier: MIT
- Implement `DerefMut` for `User<T>` and `Admin<T>`.
- Add `device_mut` method to `DeviceWrapper`.
- Require a mutable `Device` reference if a method changes the device state.
-- Update the `nitrokey-sys` dependency to version 3.5.0.
-- Update the `nitrokey-test` dependency to version 0.3 and add the
- `nitrokey-test-state` dependency in version 0.1.0.
+- Update dependencies:
+ - `nitrokey-sys` to 3.5
+ - `nitrokey-test` to 0.3
+ - `rand_core` to 0.5
+ - `rand_os` to 0.2
+- Add `nitrokey-test-state` dependency in version 0.1.
- Refactor connection management:
- Add `ConcurrentAccessError` and `PoisonError` `Error` variants.
- Add the `Manager` struct that manages connections to Nitrokey devices.
diff --git a/Cargo.toml b/Cargo.toml
index 62eea02..a912859 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -17,12 +17,12 @@ license = "MIT"
exclude = [".builds/*"]
[dependencies]
-lazy_static = "1.2.0"
+lazy_static = "1.2"
libc = "0.2"
nitrokey-sys = "3.5"
-rand_core = {version = "0.3", default-features = false, features = ["std"] }
-rand_os = {version = "0.1"}
+rand_core = {version = "0.5", default-features = false, features = ["std"] }
+rand_os = {version = "0.2"}
[dev-dependencies]
nitrokey-test = "0.3"
-nitrokey-test-state = "0.1.0"
+nitrokey-test-state = "0.1"
diff --git a/src/util.rs b/src/util.rs
index fdb73c3..a5dd1e5 100644
--- a/src/util.rs
+++ b/src/util.rs
@@ -77,9 +77,8 @@ pub fn get_last_error() -> Error {
}
pub fn generate_password(length: usize) -> Result<Vec<u8>, Error> {
- let mut rng = OsRng::new().map_err(|err| Error::RandError(Box::new(err)))?;
let mut data = vec![0u8; length];
- rng.fill_bytes(&mut data[..]);
+ OsRng.fill_bytes(&mut data[..]);
Ok(data)
}