diff options
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"); - }, } } } |