summaryrefslogtreecommitdiffstats
path: root/tool/src/commands
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2020-04-08 17:13:23 +0200
committerJustus Winter <justus@sequoia-pgp.org>2020-04-08 19:20:20 +0200
commit33ef33fdc2f8b3414c046efd567fb353dee391e6 (patch)
treea4ba11a6d69879cff9575e0e0a172b49bd90585b /tool/src/commands
parentcb598ce96d611f68ca887d2f30352f84f642abb9 (diff)
sq: Improve error handling.
Diffstat (limited to 'tool/src/commands')
-rw-r--r--tool/src/commands/decrypt.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/tool/src/commands/decrypt.rs b/tool/src/commands/decrypt.rs
index bff349e5..ddfa2a5c 100644
--- a/tool/src/commands/decrypt.rs
+++ b/tool/src/commands/decrypt.rs
@@ -328,9 +328,8 @@ pub fn decrypt_unwrap(ctx: &Context, policy: &dyn Policy,
decrypt)?;
}
if pp.encrypted() {
- // XXX: That is not quite the right error to return.
return Err(
- openpgp::Error::InvalidSessionKey(
+ openpgp::Error::MissingSessionKey(
"No session key".into()).into());
}