Home GnuPG
Diffusion GpgOL 7cb3feaf64d3

Make S/MIME compatible with Exchange 2016 patched

Description

Make S/MIME compatible with Exchange 2016 patched

* src/oomhelp.h (PR_PIDNameContentType_DASL): New.
* src/mimemaker.cpp (create_top_encryption_header): We no longer
create the header ourself.
* src/mail.cpp (Mail::update_crypt_oom): Here we set the header
values now.
* src/cryptcontroller.h (CryptController::get_protocol)
(CryptController::is_encrypter): New accessors.
* src/cryptcontroller.cpp (create_encrypt_attach): Write binary
data for S/MIME. Outlook will do the base64 conversion.

This fixes a lot of interop issues. Otherwise we would
either have weirdly structured mails or mails without smime-type
header or mails where the pkcs7-mime part was doubly base64
encoded with the inner encoding containing the headers.

Hope this works with older Exchanges and Outlooks.