summaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@pep.foundation>2020-01-13 18:31:28 +0100
committerNeal H. Walfield <neal@pep.foundation>2020-01-13 21:21:35 +0100
commit78ebbf05c9839771ae5dc3ce0c1c3cd278f0bde4 (patch)
tree73eebd625ff7a96fb03808fb0919e6d19900f93b /ipc
parent4b2288ad66cc894956dc3511259b2a75bfc94301 (diff)
openpgp: Add Error variant to VerificationResult.
- Add an Error variant to VerificationResult.
Diffstat (limited to 'ipc')
-rw-r--r--ipc/examples/gpg-agent-decrypt.rs4
-rw-r--r--ipc/tests/gpg-agent.rs2
2 files changed, 6 insertions, 0 deletions
diff --git a/ipc/examples/gpg-agent-decrypt.rs b/ipc/examples/gpg-agent-decrypt.rs
index fe692689..8b39762c 100644
--- a/ipc/examples/gpg-agent-decrypt.rs
+++ b/ipc/examples/gpg-agent-decrypt.rs
@@ -146,6 +146,10 @@ impl<'a> VerificationHelper for Helper<'a> {
BadChecksum { cert, .. } => {
eprintln!("Bad signature from {}", cert);
},
+ Error { error, .. } => {
+ eprintln!("Error verifying signature: {}",
+ error);
+ },
}
}
}
diff --git a/ipc/tests/gpg-agent.rs b/ipc/tests/gpg-agent.rs
index 2176d467..5461d7a6 100644
--- a/ipc/tests/gpg-agent.rs
+++ b/ipc/tests/gpg-agent.rs
@@ -172,6 +172,8 @@ fn sign() {
"Missing key to verify signature")),
Some(VerificationResult::BadChecksum { .. }) =>
return Err(failure::err_msg("Bad signature")),
+ Some(VerificationResult::Error { error, .. }) =>
+ return Err(error),
None =>
return Err(failure::err_msg("No signature")),
}