mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
try_decrypt: do not use gossip_key if public_key is available
public_key is updated with apply_header in try_decrypt right above this code, so it makes no sense to allow signing messages with gossip key.
This commit is contained in:
committed by
holger krekel
parent
8f7f4f95e8
commit
0bf8017e8f
@@ -166,11 +166,10 @@ pub async fn try_decrypt(
|
||||
}
|
||||
if let Some(peerstate) = peerstate {
|
||||
peerstate.handle_fingerprint_change(context).await?;
|
||||
if let Some(key) = peerstate.gossip_key {
|
||||
public_keyring_for_validate.add(key);
|
||||
}
|
||||
if let Some(key) = peerstate.public_key {
|
||||
public_keyring_for_validate.add(key);
|
||||
} else if let Some(key) = peerstate.gossip_key {
|
||||
public_keyring_for_validate.add(key);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user