aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobin Krahl <robin.krahl@ireas.org>2019-01-17 13:30:20 +0000
committerRobin Krahl <robin.krahl@ireas.org>2019-01-20 21:08:52 +0000
commitc3e551dd40142bcd2552972d549f31ad7483621d (patch)
tree0411fa3dfa00322274e0fe80f7661ad6c7a5278a /src
parent391cfd03edafd6e857d6cdbee1347f38e7a02b3f (diff)
downloadnitrokey-rs-c3e551dd40142bcd2552972d549f31ad7483621d.tar.gz
nitrokey-rs-c3e551dd40142bcd2552972d549f31ad7483621d.tar.bz2
Make CommandError messages more general
For example, the WrongSlot error may also be returned for a PWS slot.
Diffstat (limited to 'src')
-rw-r--r--src/error.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/error.rs b/src/error.rs
index 1aaf21f..ef9b149 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -135,15 +135,15 @@ impl fmt::Display for CommandError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.write_str(match *self {
CommandError::WrongCrc => "A packet with a wrong checksum has been sent or received",
- CommandError::WrongSlot => "The given OTP slot does not exist",
- CommandError::SlotNotProgrammed => "The given OTP slot is not programmed",
+ CommandError::WrongSlot => "The given slot does not exist",
+ CommandError::SlotNotProgrammed => "The given slot is not programmed",
CommandError::WrongPassword => "The given password is wrong",
CommandError::NotAuthorized => {
"You are not authorized for this command or provided a wrong temporary \
password"
}
CommandError::Timestamp => "An error occurred when getting or setting the time",
- CommandError::NoName => "You did not provide a name for the OTP slot",
+ CommandError::NoName => "You did not provide a name for the slot",
CommandError::NotSupported => "This command is not supported by this device",
CommandError::UnknownCommand => "This command is unknown",
CommandError::AesDecryptionFailed => "AES decryption failed",