summaryrefslogtreecommitdiffstats
path: root/tool/src/commands/mod.rs
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@pep.foundation>2020-01-14 09:37:04 +0100
committerNeal H. Walfield <neal@pep.foundation>2020-01-14 10:07:09 +0100
commit33ab7dd6d9b7f92afab67d8e00902a71a677c341 (patch)
tree75934a3bff0ae3e537807764634726548fa278c0 /tool/src/commands/mod.rs
parent9e4e94e3378093baf569404b4be1ca8b7fedbe1b (diff)
openpgp: Remove unneeded fields from VerificationResult::NotAlive.
- VerificationResult::NotAlive means that the signature is not alive. This has nothing to do with a specific key. Indeed, there might not even be a key available, but we can still detect this error condition. - As such, remove the cert and key fields from VerificationResult::NotAlive.
Diffstat (limited to 'tool/src/commands/mod.rs')
-rw-r--r--tool/src/commands/mod.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/tool/src/commands/mod.rs b/tool/src/commands/mod.rs
index a8e8a93b..7ca50253 100644
--- a/tool/src/commands/mod.rs
+++ b/tool/src/commands/mod.rs
@@ -269,9 +269,13 @@ impl<'a> VHelper<'a> {
let (issuer, level) = match result {
GoodChecksum { sig, ka, .. }
- | NotAlive { sig, ka, .. }
| BadChecksum { sig, ka, .. } =>
(ka.key().keyid(), sig.level()),
+ NotAlive { sig, .. } =>
+ (sig.get_issuers().get(0)
+ .map(|i| i.into())
+ .unwrap_or(KeyID::wildcard()),
+ sig.level()),
MissingKey { .. } => unreachable!("handled above"),
Error { .. } => unreachable!("handled above"),
};