Diffusion GpgOL 88a3204d34b9

Change S/MIME behavior depending on Exchange ver.

Authored by aheinecke on Apr 11 2018, 1:15 PM.

Description

Change S/MIME behavior depending on Exchange ver.

* src/oomhelp.cpp, src/oomhelp.h (get_ex_major_version_for_addr): New.
* src/cryptcontroller.cpp (create_encrypt_attach): Accept
exchange version as parameter. Change behavior accordingly.
(CryptController::update_mail_mapi): Add handling for exchange ver.
* src/mimemaker.cpp (create_top_encryption_header): Accept
exchange ver.
* src/mimemaker.h: Update accordingly.

This fixes 7cb3feaf which broke S/MIME encrypted send for
older exchange versions and SMTP / IMAP. Because it unconditionally
used different code to construct the encrypted message in the
expectation that this would also work as an alternative.