diff options
Diffstat (limited to 'nitrocli/src/commands.rs')
-rw-r--r-- | nitrocli/src/commands.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nitrocli/src/commands.rs b/nitrocli/src/commands.rs index 269cafc..b3e71a1 100644 --- a/nitrocli/src/commands.rs +++ b/nitrocli/src/commands.rs @@ -23,8 +23,6 @@ use crate::error::Error; use crate::pinentry; use crate::Result; -const PIN_TYPE: pinentry::PinType = pinentry::PinType::User; - /// Create an `error::Error` with an error message of the format `msg: err`. fn get_error(msg: &str, err: &nitrokey::CommandError) -> Error { Error::Error(format!("{}: {:?}", msg, err)) @@ -198,5 +196,7 @@ pub fn close() -> Result<()> { /// Clear the PIN stored when opening the nitrokey's encrypted volume. pub fn clear() -> Result<()> { - pinentry::clear_passphrase(PIN_TYPE) + pinentry::clear_passphrase(pinentry::PinType::Admin)?; + pinentry::clear_passphrase(pinentry::PinType::User)?; + Ok(()) } |