mirror of
https://github.com/chatmail/core.git
synced 2026-05-03 21:36:29 +03:00
Prefer encryption for the peer if the message is encrypted or signed with the known key (#3844)
Note that if the message is encrypted, we don't check whether it's signed with an attached key currently, otherwise a massive refactoring of the code is needed because for encrypted messages a signature is checked and discarded first now.
This commit is contained in:
@@ -5359,7 +5359,13 @@ Reply from different address
|
||||
|
||||
let raw = include_bytes!("../test-data/message/thunderbird_with_autocrypt_unencrypted.eml");
|
||||
receive_imf(&t, raw, false).await?;
|
||||
let peerstate = Peerstate::from_addr(&t, "alice@example.org")
|
||||
.await?
|
||||
.unwrap();
|
||||
assert_eq!(peerstate.prefer_encrypt, EncryptPreference::Mutual);
|
||||
|
||||
let raw = include_bytes!("../test-data/message/thunderbird_signed_unencrypted.eml");
|
||||
receive_imf(&t, raw, false).await?;
|
||||
let peerstate = Peerstate::from_addr(&t, "alice@example.org")
|
||||
.await?
|
||||
.unwrap();
|
||||
|
||||
Reference in New Issue
Block a user