From ed2bc9e44d78e239967816c0523b1796d2de44fb Mon Sep 17 00:00:00 2001 From: link2xt Date: Mon, 30 Oct 2023 14:08:51 +0000 Subject: [PATCH] fix: remove previous attempt to recover from verified key change This approach was introduced in the C core before Rust conversion: It does not have tests and does not practically help, so we remove it in favor of alternative discussed in --- src/receive_imf.rs | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/receive_imf.rs b/src/receive_imf.rs index db79c02e1..b20ca98a1 100644 --- a/src/receive_imf.rs +++ b/src/receive_imf.rs @@ -2333,15 +2333,9 @@ async fn has_verified_encryption( // mark gossiped keys (if any) as verified if mimeparser.gossiped_addr.contains(&to_addr.to_lowercase()) { if let Some(mut peerstate) = peerstate { - // if we're here, we know the gossip key is verified: - // - use the gossip-key as verified-key if there is no verified-key - // - OR if the verified-key does not match public-key or gossip-key - // (otherwise a verified key can _only_ be updated through QR scan which might be annoying, - // see for a discussion about this point) - if !is_verified - || peerstate.verified_key_fingerprint != peerstate.public_key_fingerprint - && peerstate.verified_key_fingerprint != peerstate.gossip_key_fingerprint - { + // If we're here, we know the gossip key is verified. + // Use the gossip-key as verified-key if there is no verified-key. + if !is_verified { info!(context, "{} has verified {}.", contact.get_addr(), to_addr); let fp = peerstate.gossip_key_fingerprint.clone(); if let Some(fp) = fp {