mirror of
https://github.com/chatmail/core.git
synced 2026-05-01 20:36:31 +03:00
fix: remove previous attempt to recover from verified key change
This approach was introduced in the C core before Rust conversion:
<ced88321eb>
It does not have tests and does not practically help,
so we remove it in favor of alternative discussed in
<https://github.com/deltachat/deltachat-core-rust/issues/4541>
This commit is contained in:
@@ -2333,15 +2333,9 @@ async fn has_verified_encryption(
|
|||||||
// mark gossiped keys (if any) as verified
|
// mark gossiped keys (if any) as verified
|
||||||
if mimeparser.gossiped_addr.contains(&to_addr.to_lowercase()) {
|
if mimeparser.gossiped_addr.contains(&to_addr.to_lowercase()) {
|
||||||
if let Some(mut peerstate) = peerstate {
|
if let Some(mut peerstate) = peerstate {
|
||||||
// if we're here, we know the gossip key is verified:
|
// If we're here, we know the gossip key is verified.
|
||||||
// - use the gossip-key as verified-key if there is no verified-key
|
// 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
|
if !is_verified {
|
||||||
// (otherwise a verified key can _only_ be updated through QR scan which might be annoying,
|
|
||||||
// see <https://github.com/nextleap-project/countermitm/issues/46> 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
|
|
||||||
{
|
|
||||||
info!(context, "{} has verified {}.", contact.get_addr(), to_addr);
|
info!(context, "{} has verified {}.", contact.get_addr(), to_addr);
|
||||||
let fp = peerstate.gossip_key_fingerprint.clone();
|
let fp = peerstate.gossip_key_fingerprint.clone();
|
||||||
if let Some(fp) = fp {
|
if let Some(fp) = fp {
|
||||||
|
|||||||
Reference in New Issue
Block a user