aboutsummaryrefslogtreecommitdiffstats
path: root/src/error.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2020-05-03 00:21:07 -0400
committerJesse Luehrs <doy@tozt.net>2020-05-03 00:56:21 -0400
commit047550f2368d134c9d5dca60aeb0b56fe151a323 (patch)
tree2ad014146d2214db42f550646379bb2dbd571ff1 /src/error.rs
parentea6398d5951ef6a5811cf605bfa223b5b1ce08c4 (diff)
downloadrbw-047550f2368d134c9d5dca60aeb0b56fe151a323.tar.gz
rbw-047550f2368d134c9d5dca60aeb0b56fe151a323.zip
move to ring for things that it supports
it doesn't support AES_256_CBC_HMAC_SHA256, so we can't move that over yet (see https://github.com/briansmith/ring/issues/588)
Diffstat (limited to 'src/error.rs')
-rw-r--r--src/error.rs18
1 files changed, 3 insertions, 15 deletions
diff --git a/src/error.rs b/src/error.rs
index b1ce2b6..2222f66 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -22,18 +22,9 @@ pub enum Error {
res: std::process::ExitStatus,
},
- // no Error impl
- // #[snafu(display("failed to expand with hkdf: {}", source))]
- // HkdfExpand { source: hkdf::InvalidLength },
#[snafu(display("failed to expand with hkdf"))]
HkdfExpand,
- // no Error impl
- // #[snafu(display("failed to create hkdf: {}", source))]
- // HkdfFromPrk { source: hkdf::InvalidPrkLength },
- #[snafu(display("failed to create hkdf"))]
- HkdfFromPrk,
-
#[snafu(display("username or password incorrect"))]
IncorrectPassword,
@@ -49,12 +40,6 @@ pub enum Error {
#[snafu(display("invalid mac"))]
InvalidMac,
- // no Error impl
- // #[snafu(display("invalid mac key: {}", source))]
- // InvalidMacKey { source: hmac::crypto_mac::InvalidKeyLength },
- #[snafu(display("invalid mac key"))]
- InvalidMacKey,
-
#[snafu(display("failed to load config: {}", source))]
LoadConfig { source: std::io::Error },
@@ -73,6 +58,9 @@ pub enum Error {
#[snafu(display("failed to load db: {}", source))]
LoadDbJson { source: serde_json::Error },
+ #[snafu(display("pbkdf2 requires at least 1 iteration (got 0)"))]
+ Pbkdf2ZeroIterations,
+
#[snafu(display("pinentry cancelled"))]
PinentryCancelled,