<<< Date Index >>>     <<< Thread Index >>>

For 1.5.9 - (problem w/ pgp_autoinline)



Not my patch, but I think this one fixes a bug with pgp_autoinline not
working when not autosigning / autoencrypting.

See: http://marc.theaimsgroup.com/?l=mutt-dev&m=110742186705368&w=2

--- pgp.c.BAK   Mon Jan 31 22:51:01 2005
+++ pgp.c       Thu Feb  3 17:59:42 2005
@@ -1475,6 +1475,7 @@
 
 int pgp_send_menu (HEADER *msg, int *redraw)
 {
+  int prefer_inline;
   pgp_key_t p;
   char input_signas[SHORT_STRING];
 
@@ -1482,6 +1483,13 @@
   
   if (!(WithCrypto & APPLICATION_PGP))
     return msg->security;
+  
+  /* honour pgp_autoinline */
+  prefer_inline = option(OPTPGPAUTOINLINE) ? INLINE : 0;
+  prefer_inline = ((msg->security & APPLICATION_PGP)
+                  && (msg->security & (SIGN | ENCRYPT)))
+                 ? (msg->security & INLINE) : prefer_inline;
+  msg->security |= prefer_inline;
   
   snprintf (prompt, sizeof (prompt), 
            _("PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, %s, or (c)lear? "),

--Q68bSM7Ycu6FN28Q--