diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2020-10-01 12:49:58 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2020-10-02 15:09:11 +0200 |
commit | 774526f3f52b51043d918433ba54300f54a6c3b5 (patch) | |
tree | c28af5400b658fcdfbf407139e7aece726148430 /openpgp/src | |
parent | 46f9d859b56cfbbf8a0e41d76f2d0abaa055b73d (diff) |
openpgp: Avoid shadowing variable.
- At the very least, this reduces possible confusion.
Diffstat (limited to 'openpgp/src')
-rw-r--r-- | openpgp/src/parse/stream.rs | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/openpgp/src/parse/stream.rs b/openpgp/src/parse/stream.rs index ec6734d5..96d2d132 100644 --- a/openpgp/src/parse/stream.rs +++ b/openpgp/src/parse/stream.rs @@ -2574,21 +2574,21 @@ impl<'a, H: VerificationHelper + DecryptionHelper> Decryptor<'a, H> { } }; - err = if let Err(err) = ka.cert().alive() { + err = if let Err(error) = ka.cert().alive() { t!("{:02X}{:02X}: cert {} not alive: {}", - sigid[0], sigid[1], ka.cert().fingerprint(), err); + sigid[0], sigid[1], ka.cert().fingerprint(), error); VerificationError::BadKey { sig, ka, - error: err, + error, } - } else if let Err(err) = ka.alive() { + } else if let Err(error) = ka.alive() { t!("{:02X}{:02X}: key {} not alive: {}", - sigid[0], sigid[1], ka.fingerprint(), err); + sigid[0], sigid[1], ka.fingerprint(), error); VerificationError::BadKey { sig, ka, - error: err, + error, } } else if let RevocationStatus::Revoked(rev) = ka.cert().revocation_status() @@ -2624,15 +2624,15 @@ impl<'a, H: VerificationHelper + DecryptionHelper> Decryptor<'a, H> { "key is not signing capable".into()) .into(), } - } else if let Err(err) = sig.signature_alive( + } else if let Err(error) = sig.signature_alive( self.time, self.clock_skew_tolerance) { t!("{:02X}{:02X}: Signature not alive: {}", - sigid[0], sigid[1], err); + sigid[0], sigid[1], error); VerificationError::BadSignature { sig, ka, - error: err, + error, } } else if self.identity.as_ref().map(|identity| { let (have_one, contains_identity) = @@ -2661,13 +2661,13 @@ impl<'a, H: VerificationHelper + DecryptionHelper> Decryptor<'a, H> { } else { match sig.verify(ka.key()) { Ok(()) => { - if let Err(err) = self.policy.signature(&sig) { + if let Err(error) = self.policy.signature(&sig) { t!("{:02X}{:02X}: signature rejected by policy: {}", - sigid[0], sigid[1], err); + sigid[0], sigid[1], error); VerificationError::BadSignature { sig, ka, - error: err, + error, } } else { t!("{:02X}{:02X}: good checksum using {}", @@ -2681,13 +2681,13 @@ impl<'a, H: VerificationHelper + DecryptionHelper> Decryptor<'a, H> { continue 'sigs; } } - Err(err) => { + Err(error) => { t!("{:02X}{:02X} using {}: error: {}", - sigid[0], sigid[1], ka.fingerprint(), err); + sigid[0], sigid[1], ka.fingerprint(), error); VerificationError::BadSignature { sig, ka, - error: err, + error, } } } |