diff options
author | Kevin McCarthy <kevin@8t8.us> | 2016-12-31 19:57:07 -0800 |
---|---|---|
committer | Kevin McCarthy <kevin@8t8.us> | 2016-12-31 19:57:07 -0800 |
commit | 17030b4700a498161ff5ab1eda28f0750cdbceb2 (patch) | |
tree | eb0bd637c11c695b94594ca91600804b4f84796f /crypt-gpgme.c | |
parent | 10f5ca3e65a56d7e52c0d3b41652e3dabee3cecd (diff) |
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!
Diffstat (limited to 'crypt-gpgme.c')
-rw-r--r-- | crypt-gpgme.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/crypt-gpgme.c b/crypt-gpgme.c index e8e0b135..26974b99 100644 --- a/crypt-gpgme.c +++ b/crypt-gpgme.c @@ -1091,7 +1091,11 @@ BODY *smime_gpgme_build_smime_entity (BODY *a, char *keylist) 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); |