Home GnuPG
Diffusion GpgOL 553db6ba3cfa

Add GPGME based async decryption
553db6ba3cfaUnpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

Add GPGME based async decryption

* src/Makefile.am (gpgol_SOURCES): Add Mimedataprovider.
* src/mail.cpp (Mail::m_moss_position): Store moss pos.
(Mail::is_mail_valid): Helper to check for orphaned mail pointer.
(Mail::pre_process_message): Store moss position.
(get_cipherstream): Use stored moss position.
(use_body): Removed. Always use MOSS.
(do_parsing): Helper to run in different thread.
(Mail::decrypt_verify): Insert placehoder, create parser,
start parser thread.
(Mail::parsing_done): Helper to insert plaintext in UI Thread.
(Mail::revert_all_mails): Fix typo.
(Mail::wipe_all_mails): Init err.
(Mail::close_inspector): Helper to close current inspector
with discard changes.
* src/mail.h: Update accordingly.
* src/mailparser.cpp (MailParser::MailParser): Use MimeDataProvider.
(operation_for_type): Helper to figure out type of work and protocol.
(MailParser::parse): Enable a fist version of decrypt.
* src/mailparser.h: Update accordingly.
* src/main.c (DllMain): Set w32-inst-dir for GpgME.
* src/mimedataprovider.cpp: New. Copy stream into GpgME Data.
* src/mimedataprovider.h: New.
* src/util.h (log_mime_parser): New helper for logging.
* src/windowmessages.cpp (gpgol_window_proc): Handle parsing
done signal.
* src/windowmessages.h (PARSING_DONE): New.
* src/attachment.cpp: Implement DataProvider interface.
* src/attachment.h: Update accordingly.

The idea is that DataProvider classes will take and recieve
Data from GpgOL, copy it into internal buffers (to avoid working
with the OOM from a background thread) and then provide the
data as needed to GpgOL. On Read they shall parse the MIME e.g.
into a signature part, and on Write they shall deliver useful
objects (e.g. attachments) for Outlook to work with.

The Close / Wipe changes are a bit unrelated as they were created
for experiments to avoid "save your changes" message boxes.

Details

Provenance
aheineckeAuthored on Aug 22 2016, 3:40 PM
Parents
rO7f9f7bf99de3: Return MOSS attachment positon from mapihelp
Branches
Unknown
Tags
Unknown