Read autocrypt header for autoimport
* src/common_indep.h (autocrypt_s): Data transfer struct. * src/keycache.cpp (KeyCache::import_pgp_key_data): Fix and add more debugging. * src/mail.cpp (Mail::preProcessMessage_m): Check for autocrypt headers even on non crypto mails. (Mail::decryptVerify_o): Parse autocrypt header for crypto mails. * src/mapihelp.cpp (get_message_content_type_cb): Renamed to parse_headers_cb. (ac_get_value): New helper. (prepare_key_data): New helper. (mapi_get_header_info): General function for additional header info. * src/mapihelp.h: Update accordingly. * src/parsecontroller.cpp (handle_autocrypt_info): New helper. (ParseController::parse): Handle autocrypt info on demand. * src/parsecontroller.h: Update accordingly.
Ideally we want to do the import in the parse step as it is
then in the background thread. But for unencrypted mails we
have to do in in the pre processing because afterwards we no
longer look at the unencrypted mail.
mapi_get_header_info is intended as a new one time parse function
to get some more info from the headers. For now it only supports
autocrypt header.