Show preview of contents of mails earlier
* src/keycache.cpp (do_populate): Also cache the current config. (get_cached_config, KeyCache::setConfig): New. (KeyCache::protocolIsOnline): Check if an operation might require an online connection. * src/mail.cpp (Mail::add_attachments_o): Only add attachments once. (do_parsing): Handle preview. (Mail::decryptVerify_o): Insert verify placeholder for multipart signed with body. (Mail::updateBody_o): Handle preview. (Mail::parsingDone_o): Rename to make it clear that its OOM based. Handle preview. (Mail::isSMIME): Add non MAPI variant. (Mail::getOriginalBody): New accessor. (ParseController::parse): Add offline mode. (gpgol_window_proc): New. SHOW_PREVIEW message. * tests/run-parser.cpp (main): Use offline mode.
This adds a new mode for GpgOL that it shows unverified content
already, but the signature state is only updated after the
verification is done. So there should not be a security issue.
This will help in cases where the initial start of gpg-agent and
dirmngr takes a while or when CRL's are fetched. On a fast system
or in offline mode it should rarely be visible.
- GnuPG-Bug-Id: T4944