summaryrefslogtreecommitdiffstats
path: root/openpgp/src/parse/stream.rs
diff options
context:
space:
mode:
Diffstat (limited to 'openpgp/src/parse/stream.rs')
-rw-r--r--openpgp/src/parse/stream.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/openpgp/src/parse/stream.rs b/openpgp/src/parse/stream.rs
index 4e8c652e..32f1c2ab 100644
--- a/openpgp/src/parse/stream.rs
+++ b/openpgp/src/parse/stream.rs
@@ -1319,10 +1319,9 @@ impl<'a, H: VerificationHelper + DecryptionHelper> Decryptor<'a, H> {
decryption_proxy)?;
}
if ! pp.decrypted() {
- // XXX: That is not quite the right error to return.
return Err(
- Error::InvalidSessionKey("No session key".into())
- .into());
+ Error::MissingSessionKey(
+ "No session key decrypted".into()).into());
}
let sym_algo =