]> granicus.if.org Git - mutt/commitdiff
Check $pgp_autoinline and $pgp_replyinline if oppenc is set. (closes #3846)
authorKevin McCarthy <kevin@8t8.us>
Fri, 1 Jul 2016 20:33:20 +0000 (13:33 -0700)
committerKevin McCarthy <kevin@8t8.us>
Fri, 1 Jul 2016 20:33:20 +0000 (13:33 -0700)
The first oppenc call takes place after the initial checks of
$pgp_autoline and $pgp_replyinline, and doesn't go through the pgp
menu.

Therefore, check for $pgp_autoline and $pgp_replyinline if oppenc is
set too, to avoid oppenc enabling encryption without INLINE being set
in those cases.

a6a4d6ed0f19 previously cleaned things up so that it is safe
to set INLINE even if encryption isn't enabled.

send.c

diff --git a/send.c b/send.c
index 387de5dbfb7d5fefd462031fc9fa5b896da3776d..8b71ea57410556ade49f74ec921c40f0f70e4c31 100644 (file)
--- a/send.c
+++ b/send.c
@@ -1507,7 +1507,8 @@ ci_send_message (int flags,               /* send mode */
       msg->security |= SIGN;
     if (option (OPTCRYPTREPLYSIGNENCRYPTED) && cur && (cur->security & ENCRYPT))
       msg->security |= SIGN;
-    if (WithCrypto & APPLICATION_PGP && (msg->security & (ENCRYPT | SIGN)))
+    if ((WithCrypto & APPLICATION_PGP) &&
+        ((msg->security & (ENCRYPT | SIGN)) || option (OPTCRYPTOPPORTUNISTICENCRYPT)))
     {
       if (option (OPTPGPAUTOINLINE))
        msg->security |= INLINE;