mirror of
https://github.com/chatmail/core.git
synced 2026-05-24 01:06:31 +03:00
fix(e2ee): don't panic on missing keys
This commit is contained in:
@@ -673,8 +673,12 @@ pub unsafe fn dc_e2ee_decrypt(
|
|||||||
dc_handle_degrade_event(context, &peerstate);
|
dc_handle_degrade_event(context, &peerstate);
|
||||||
}
|
}
|
||||||
// TODO: avoid clone
|
// TODO: avoid clone
|
||||||
public_keyring_for_validate.add(peerstate.gossip_key.clone().unwrap());
|
if let Some(ref key) = peerstate.gossip_key {
|
||||||
public_keyring_for_validate.add(peerstate.public_key.clone().unwrap());
|
public_keyring_for_validate.add(key.clone());
|
||||||
|
}
|
||||||
|
if let Some(ref key) = peerstate.public_key {
|
||||||
|
public_keyring_for_validate.add(key.clone());
|
||||||
|
}
|
||||||
(*helper).signatures = malloc(::std::mem::size_of::<dc_hash_t>()) as *mut dc_hash_t;
|
(*helper).signatures = malloc(::std::mem::size_of::<dc_hash_t>()) as *mut dc_hash_t;
|
||||||
dc_hash_init((*helper).signatures, 3i32, 1i32);
|
dc_hash_init((*helper).signatures, 3i32, 1i32);
|
||||||
iterations = 0i32;
|
iterations = 0i32;
|
||||||
|
|||||||
Reference in New Issue
Block a user