diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2019-11-26 16:41:58 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2019-11-27 13:02:12 +0100 |
commit | 0eccc8747c26e4676f2d2f8739e89f03357f87e0 (patch) | |
tree | 20d89933d51472fd2cc7b63b6c62b3446c585e31 /ipc/examples/gpg-agent-decrypt.rs | |
parent | c64eb5733fa217f10e51f24dd1d6614703f0d828 (diff) |
openpgp: Make variants of VerificationResult struct-like, add infos.
Diffstat (limited to 'ipc/examples/gpg-agent-decrypt.rs')
-rw-r--r-- | ipc/examples/gpg-agent-decrypt.rs | 33 |
1 files changed, 10 insertions, 23 deletions
diff --git a/ipc/examples/gpg-agent-decrypt.rs b/ipc/examples/gpg-agent-decrypt.rs index 2b8b7049..3eeb140d 100644 --- a/ipc/examples/gpg-agent-decrypt.rs +++ b/ipc/examples/gpg-agent-decrypt.rs @@ -133,32 +133,19 @@ impl<'a> VerificationHelper for Helper<'a> { MessageLayer::SignatureGroup { ref results } => for result in results { match result { - GoodChecksum(ref sig, ..) => { - let issuer = sig.issuer() - .expect("good checksum has an issuer"); - eprintln!("Good signature from {}", issuer); + GoodChecksum { tpk, .. } => { + eprintln!("Good signature from {}", tpk); }, - NotAlive(ref sig) => { - let issuer = sig.issuer() - .expect("Good, but not live signature has an \ - issuer"); - eprintln!("Good, but not live signature from {}", - issuer); + NotAlive { tpk, .. } => { + eprintln!("Good, but not alive signature from {}", + tpk); }, - MissingKey(ref sig) => { - let issuer = sig.issuer() - .expect("missing key checksum has an \ - issuer"); - eprintln!("No key to check signature from {}", - issuer); + MissingKey { .. } => { + eprintln!("No key to check signature"); + }, + BadChecksum { tpk, .. } => { + eprintln!("Bad signature from {}", tpk); }, - BadChecksum(ref sig) => - if let Some(issuer) = sig.issuer() { - eprintln!("Bad signature from {}", issuer); - } else { - eprintln!("Bad signature without issuer \ - information"); - }, } } } |