Diffusion GpgOL abe308f5ce36

Add import / override functions to keycache

Authored by aheinecke on Sep 5 2018, 8:54 AM.

Description

Add import / override functions to keycache

* src/keycache.cpp (KeyCache::importFromAddrBook): New.
(KeyCache::onAddrBookImportJobDone): New internal helper.
(KeyCache::Private::importFromAddrBook): New.
(KeyCache::Private::getPGPOverrides): Access imported overrides.
(KeyCache::Private::getEncryptionKeys): Respect overrides.
(do_import): New thread function to do the actual import.
* src/keycache.h: Update accordingly and add comments which
functions are async.

This adds support to the keycache to import keys to override
existing keys / force their usage regardless of validity.

Details