summaryrefslogtreecommitdiffstats
path: root/tool/src
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2020-08-12 15:39:39 +0200
committerJustus Winter <justus@sequoia-pgp.org>2020-08-20 12:17:20 +0200
commitbb447441a4a94563736760e28f368e1186064c57 (patch)
tree48f3ed194a2a356bc7e59fac8233336960ecadad /tool/src
parent837192beb3700d8fb110560261036c856f4bf13e (diff)
openpgp: Make key::Encrypted::ciphertext fallible.
Diffstat (limited to 'tool/src')
-rw-r--r--tool/src/commands/dump.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/tool/src/commands/dump.rs b/tool/src/commands/dump.rs
index 93986342..b149f837 100644
--- a/tool/src/commands/dump.rs
+++ b/tool/src/commands/dump.rs
@@ -440,8 +440,10 @@ impl PacketDumper {
writeln!(output, "{} Sym. algo: {}", ii,
e.algo())?;
if pd.mpis {
- pd.dump_mpis(output, &ii, &[e.ciphertext()],
- &["ciphertext"])?;
+ if let Ok(ciphertext) = e.ciphertext() {
+ pd.dump_mpis(output, &ii, &[ciphertext],
+ &["ciphertext"])?;
+ }
}
},
}