diff options
author | Robin Krahl <robin.krahl@ireas.org> | 2018-05-29 20:49:40 +0000 |
---|---|---|
committer | Robin Krahl <robin.krahl@ireas.org> | 2018-05-29 22:53:02 +0200 |
commit | 7197f19f38b06fe2953cfba1fe755d4562f5786e (patch) | |
tree | 972e6759f8eafe98669688f7dd44e0acee148331 /src/tests/otp.rs | |
parent | 89b8a947e5c622272362e967847eb19337aa68da (diff) | |
download | nitrokey-rs-7197f19f38b06fe2953cfba1fe755d4562f5786e.tar.gz nitrokey-rs-7197f19f38b06fe2953cfba1fe755d4562f5786e.tar.bz2 |
Add support for password safes
A password safe (PWS) stores names, logins and passwords in slots. PWS
are supported both by the Nitrokey Pro and the Nitrokey Storage. They
are implemented as a struct wrapping a device as the device may not be
disconnected while the password safe is alive. The creation of a
password safe is handled by the GetPasswordSafe trait, implemented by
DeviceWrapper, Pro and Storage.
Diffstat (limited to 'src/tests/otp.rs')
-rw-r--r-- | src/tests/otp.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/tests/otp.rs b/src/tests/otp.rs index 10f569d..8c59341 100644 --- a/src/tests/otp.rs +++ b/src/tests/otp.rs @@ -1,6 +1,6 @@ use std::ops::Deref; -use {Admin, Authenticate, CommandError, CommandStatus, Config, ConfigureOtp, GenerateOtp, - OtpMode, OtpSlotData}; +use {Admin, Authenticate, CommandError, CommandStatus, Config, ConfigureOtp, GenerateOtp, OtpMode, + OtpSlotData}; use tests::util::{Target, ADMIN_PASSWORD, USER_PASSWORD}; // test suite according to RFC 4226, Appendix D @@ -22,7 +22,8 @@ static TOTP_CODES: &[(u64, &str)] = &[ ]; fn get_admin_test_device() -> Admin<Target> { - Target::connect().expect("Could not connect to the Nitrokey Pro.") + Target::connect() + .expect("Could not connect to the Nitrokey Pro.") .authenticate_admin(ADMIN_PASSWORD) .expect("Could not login as admin.") } |