From ef396882bc35a97d778e985cd69ebd5181852d8c Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Wed, 19 Feb 2020 12:18:01 +0100 Subject: openpgp: Split VerificationResult. - Split VerificationResult into Result. - Fixes #416. --- openpgp/examples/generate-sign-verify.rs | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'openpgp/examples/generate-sign-verify.rs') diff --git a/openpgp/examples/generate-sign-verify.rs b/openpgp/examples/generate-sign-verify.rs index d371a812..e5f21505 100644 --- a/openpgp/examples/generate-sign-verify.rs +++ b/openpgp/examples/generate-sign-verify.rs @@ -113,16 +113,10 @@ impl<'a> VerificationHelper for Helper<'a> { // whether the signature checks out mathematically, we apply // our policy. match results.into_iter().next() { - Some(VerificationResult::GoodChecksum { .. }) => + Some(Ok(_)) => good = true, - Some(VerificationResult::NotAlive { .. }) => - return Err(failure::err_msg( - "Signature good, but not alive")), - Some(VerificationResult::MissingKey { .. }) => - return Err(failure::err_msg( - "Missing key to verify signature")), - Some(VerificationResult::Error { error, .. }) => - return Err(error), + Some(Err(e)) => + return Err(openpgp::Error::from(e).into()), None => return Err(failure::err_msg("No signature")), } -- cgit v1.2.3