changeset: 6896:2bc2ec9ac664 user: Kevin McCarthy <ke...@8t8.us> date: Sat Dec 31 19:57:07 2016 -0800 link: http://dev.mutt.org/hg/mutt/rev/2bc2ec9ac664
Canonicalize line endings for GPGME S/MIME encryption. (closes #3904) This matches the behavior for S/MIME classic mode: OpenSSL converts the line endings to cr/lf before encrypting. Although Mutt always canonicalizes the line endings before verifying the signature, some clients do not do this for encrypted messages. Thanks to cooler for the patch! diffs (16 lines): diff -r 4cb0cd767af2 -r 2bc2ec9ac664 crypt-gpgme.c --- a/crypt-gpgme.c Tue Dec 27 15:23:37 2016 -0800 +++ b/crypt-gpgme.c Sat Dec 31 19:57:07 2016 -0800 @@ -1091,7 +1091,11 @@ if (!rset) return NULL; - plaintext = body_to_data_object (a, 0); + /* OpenSSL converts line endings to crlf when encrypting. Some + * clients depend on this for signed+encrypted messages: they do not + * convert line endings between decrypting and checking the + * signature. See #3904. */ + plaintext = body_to_data_object (a, 1); if (!plaintext) { free_recipient_set (&rset);