]> granicus.if.org Git - neomutt/commit
Fix mutt_protect() when INLINE is set. (closes #3828)
authorKevin McCarthy <kevin@8t8.us>
Sun, 10 Apr 2016 23:02:06 +0000 (16:02 -0700)
committerKevin McCarthy <kevin@8t8.us>
Sun, 10 Apr 2016 23:02:06 +0000 (16:02 -0700)
commitb259bf945ec4e3edcccc58dd0da37ed5bfd36031
treeceedfc869c06ef9f5a10ba3f7e27cc94d919d61a
parent1795554809ba1ae85f7bb92517aefb6df137204f
Fix mutt_protect() when INLINE is set. (closes #3828)

The oppenc changes allow security bits to be set even when not
encrypting or signing (for instance, OPPENCRYPT and INLINE).

mutt_protect() assumed that if INLINE is set, then either ENCRYPT or
SIGN must also be set.  Specifically, it would end up inline-signing
the message even though neither was set.

Ensure mutt_protect() is a noop if neither SIGN or ENCRYPT are set.

In ci_send_message(), check for sign or encrypt before calling the
crypt_get_keys() / mutt_protect() block, and also in the fcc section
(since clear_content would be NULL if not).

The second change to the fcc part is somewhat redundant, but better to
be explicit and avoid the case where the subtype is somehow
"encrypted" or "signed" even though msg->security wasn't set thus.
crypt.c
send.c