summaryrefslogtreecommitdiffstats
path: root/tool/src/commands
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2020-08-12 15:42:18 +0200
committerJustus Winter <justus@sequoia-pgp.org>2020-08-20 12:17:21 +0200
commit05df451257320bf8dfd86f7fdd4d63f9c78dd691 (patch)
tree7d7cfbf8a88de0138bb2cd10785743d17955adee /tool/src/commands
parentbb447441a4a94563736760e28f368e1186064c57 (diff)
openpgp: Make SKESK?::esk and SKESK5::aead_iv fallible.
Diffstat (limited to 'tool/src/commands')
-rw-r--r--tool/src/commands/dump.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/tool/src/commands/dump.rs b/tool/src/commands/dump.rs
index b149f837..12752a44 100644
--- a/tool/src/commands/dump.rs
+++ b/tool/src/commands/dump.rs
@@ -654,7 +654,7 @@ impl PacketDumper {
s.symmetric_algo())?;
write!(output, "{} S2K: ", i)?;
self.dump_s2k(output, i, s.s2k())?;
- if let Some(esk) = s.esk() {
+ if let Ok(Some(esk)) = s.esk() {
writeln!(output, "{} ESK: {}", i,
hex::encode(esk))?;
}
@@ -667,9 +667,11 @@ impl PacketDumper {
s.aead_algo())?;
write!(output, "{} S2K: ", i)?;
self.dump_s2k(output, i, s.s2k())?;
- writeln!(output, "{} IV: {}", i,
- hex::encode(s.aead_iv()))?;
- if let Some(esk) = s.esk() {
+ if let Ok(iv) = s.aead_iv() {
+ writeln!(output, "{} IV: {}", i,
+ hex::encode(iv))?;
+ }
+ if let Ok(Some(esk)) = s.esk() {
writeln!(output, "{} ESK: {}", i,
hex::encode(esk))?;
}