]> granicus.if.org Git - mutt/commitdiff
Try to fix another obscure error in S/MIME auto-signing upon reply.
authorThomas Roessler <roessler@does-not-exist.org>
Mon, 9 Dec 2002 18:38:28 +0000 (18:38 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Mon, 9 Dec 2002 18:38:28 +0000 (18:38 +0000)
send.c

diff --git a/send.c b/send.c
index 0cebc532a902ba5426dd2fbbc9e6646d79e4caad..01e395441f89597617c02ff3b5b04aec8c60de28 100644 (file)
--- a/send.c
+++ b/send.c
@@ -1250,9 +1250,9 @@ ci_send_message (int flags,               /* send mode */
        msg->security |= SIGN;
       if (option (OPTCRYPTAUTOENCRYPT))
        msg->security |= ENCRYPT;
-      if (option (OPTCRYPTREPLYENCRYPT) && cur && cur->security & ENCRYPT)
+      if (option (OPTCRYPTREPLYENCRYPT) && cur && (cur->security & ENCRYPT))
        msg->security |= ENCRYPT;
-      if (option (OPTCRYPTREPLYSIGN) && cur && cur->security & SIGN)
+      if (option (OPTCRYPTREPLYSIGN) && cur && (cur->security & SIGN))
        msg->security |= SIGN;
       if (option (OPTCRYPTREPLYSIGNENCRYPTED) && cur && cur->security & ENCRYPT)
        msg->security |= SIGN;
@@ -1261,20 +1261,19 @@ ci_send_message (int flags,             /* send mode */
     if (msg->security && cur)
     {
 #ifdef HAVE_SMIME
-      if (cur->security & APPLICATION_SMIME || option (OPTSMIMEISDEFAULT))
+      if ((cur->security & APPLICATION_SMIME) || option (OPTSMIMEISDEFAULT))
         msg->security |= APPLICATION_SMIME;
 #endif
 #ifdef HAVE_PGP
       if (cur->security & APPLICATION_PGP)
       {
 #ifdef HAVE_SMIME
-        if (option (OPTSMIMEISDEFAULT))
-          msg->security &= ~APPLICATION_SMIME;
+       msg->security &= ~APPLICATION_SMIME;
 #endif
         msg->security |= APPLICATION_PGP;
       }
 #ifdef HAVE_SMIME
-      if (~cur->security && !option (OPTSMIMEISDEFAULT))
+      if (!(cur->security & (APPLICATION_PGP|APPLICATION_SMIME)))
 #endif
        msg->security |= APPLICATION_PGP;
 #endif /* HAVE_PGP */