mirror of
https://github.com/chatmail/core.git
synced 2026-04-18 22:16:30 +03:00
feat: add secondary verified key
When a key is gossiped for the contact in a verified chat, it is stored in the secondary verified key slot. The messages are then encrypted to the secondary verified key if they are also encrypted to the contact introducing this secondary key. Chat-Group-Member-Added no longer updates the verified key. Verified group recovery only relies on the secondary verified key. When a message is received from a contact signed with a secondary verified key, secondary verified key replaces the primary verified key. When verified key is changed for the contact in response to receiving a message signed with a secondary verified key, "Setup changed" message is added to the same chat where the message is received.
This commit is contained in:
@@ -750,6 +750,19 @@ CREATE INDEX smtp_messageid ON imap(rfc724_mid);
|
||||
.await?;
|
||||
}
|
||||
|
||||
if dbversion < 104 {
|
||||
sql.execute_migration(
|
||||
"ALTER TABLE acpeerstates
|
||||
ADD COLUMN secondary_verified_key;
|
||||
ALTER TABLE acpeerstates
|
||||
ADD COLUMN secondary_verified_key_fingerprint TEXT DEFAULT '';
|
||||
ALTER TABLE acpeerstates
|
||||
ADD COLUMN secondary_verifier TEXT DEFAULT ''",
|
||||
104,
|
||||
)
|
||||
.await?;
|
||||
}
|
||||
|
||||
let new_version = sql
|
||||
.get_raw_config_int(VERSION_CFG)
|
||||
.await?
|
||||
|
||||
Reference in New Issue
Block a user