mirror of
https://github.com/chatmail/core.git
synced 2026-04-23 00:16:34 +03:00
fix: make it impossible to overwrite default key
Replacing default key when a profile is already part of verified groups results in `[The message was sent with non-verified encryption. See 'Info' for more details]` messages for other users. It is still possible to import the default key before Delta Chat generates the key.
This commit is contained in:
@@ -33,7 +33,7 @@ use crate::contact::{Contact, ContactId, Modifier, Origin};
|
||||
use crate::context::Context;
|
||||
use crate::e2ee::EncryptHelper;
|
||||
use crate::events::{Event, EventEmitter, EventType, Events};
|
||||
use crate::key::{self, DcKey, KeyPairUse};
|
||||
use crate::key::{self, DcKey};
|
||||
use crate::message::{update_msg_state, Message, MessageState, MsgId, Viewtype};
|
||||
use crate::mimeparser::{MimeMessage, SystemMessage};
|
||||
use crate::peerstate::Peerstate;
|
||||
@@ -271,7 +271,7 @@ impl TestContextBuilder {
|
||||
|
||||
let test_context = TestContext::new_internal(Some(name), self.log_sink).await;
|
||||
test_context.configure_addr(&addr).await;
|
||||
key::store_self_keypair(&test_context, &key_pair, KeyPairUse::Default)
|
||||
key::store_self_keypair(&test_context, &key_pair)
|
||||
.await
|
||||
.expect("Failed to save key");
|
||||
test_context
|
||||
|
||||
Reference in New Issue
Block a user