mirror of
https://github.com/chatmail/core.git
synced 2026-05-05 22:36:30 +03:00
perf: reduce verification load (#75)
- assume valid keys in the db - verify keys on import from headers + disk - use references in keyring when possible
This commit is contained in:
committed by
Lars-Magnus Skog
parent
8678813051
commit
379fc72094
@@ -522,6 +522,7 @@ unsafe fn set_self_key(
|
||||
CStr::from_ptr(buf_base64).to_str().unwrap(),
|
||||
KeyType::Private,
|
||||
)
|
||||
.and_then(|k| if k.verify() { Some(k) } else { None })
|
||||
.and_then(|k| k.split_key().map(|pub_key| (k, pub_key)))
|
||||
{
|
||||
stmt = dc_sqlite3_prepare(
|
||||
|
||||
Reference in New Issue
Block a user