-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This change is the last step in the process of restructuring the storage command. In particular, now that functionality pertaining hidden volumes has been moved out into a dedicated top-level command, it renames said command to encrypted, because dealing with the encrypted volume is the only functionality it provides.
- Loading branch information
Showing
9 changed files
with
26 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// storage.rs | ||
// encrypted.rs | ||
|
||
// ************************************************************************* | ||
// * Copyright (C) 2019 Daniel Mueller ([email protected]) * | ||
|
@@ -48,11 +48,11 @@ $"#, | |
let out = ncli.handle(&["status"])?; | ||
assert!(make_re(None).is_match(&out), out); | ||
|
||
let _ = ncli.handle(&["storage", "open"])?; | ||
let _ = ncli.handle(&["encrypted", "open"])?; | ||
let out = ncli.handle(&["status"])?; | ||
assert!(make_re(Some(true)).is_match(&out), out); | ||
|
||
let _ = ncli.handle(&["storage", "close"])?; | ||
let _ = ncli.handle(&["encrypted", "close"])?; | ||
let out = ncli.handle(&["status"])?; | ||
assert!(make_re(Some(false)).is_match(&out), out); | ||
|
||
|
@@ -62,15 +62,15 @@ $"#, | |
#[test_device] | ||
fn encrypted_open_close(device: nitrokey::Storage) -> crate::Result<()> { | ||
let mut ncli = Nitrocli::with_dev(device); | ||
let out = ncli.handle(&["storage", "open"])?; | ||
let out = ncli.handle(&["encrypted", "open"])?; | ||
assert!(out.is_empty()); | ||
|
||
let device = nitrokey::Storage::connect()?; | ||
assert!(device.get_status()?.encrypted_volume.active); | ||
assert!(!device.get_status()?.hidden_volume.active); | ||
drop(device); | ||
|
||
let out = ncli.handle(&["storage", "close"])?; | ||
let out = ncli.handle(&["encrypted", "close"])?; | ||
assert!(out.is_empty()); | ||
|
||
let device = nitrokey::Storage::connect()?; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters