summaryrefslogtreecommitdiffstats
path: root/openpgp/src/parse.rs
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2022-05-03 12:30:03 +0200
committerJustus Winter <justus@sequoia-pgp.org>2022-05-03 12:30:03 +0200
commit4a42790cd784bffb74d3e798a62c71b4cf920be5 (patch)
tree192675b2c135a515c344089616a01a3c94efc5ca /openpgp/src/parse.rs
parent19f50dd723d7e5c6e3260536af624203b514381c (diff)
openpgp: Don't include decrypted block in error message.
- Even though the documentation warns that this function returns rich errors that must not be returned to the user, and the mid-level streaming decryption's API prevents leaking rich errors, including decrypted data in the error message seems dicey.
Diffstat (limited to 'openpgp/src/parse.rs')
-rw-r--r--openpgp/src/parse.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/openpgp/src/parse.rs b/openpgp/src/parse.rs
index c8b329fd..d84ebba4 100644
--- a/openpgp/src/parse.rs
+++ b/openpgp/src/parse.rs
@@ -5272,10 +5272,7 @@ impl<'a> PacketParser<'a> {
if !(header[bl - 2] == header[bl]
&& header[bl - 1] == header[bl + 1]) {
return Err(Error::InvalidSessionKey(
- format!(
- "Last two 16-bit quantities don't match: {}",
- crate::fmt::to_hex(&header[..], false)))
- .into());
+ "Decryption failed".into()).into());
}
}