Nico Golde:
[apps/madmutt.git] / pgpinvoke.c
index 8bbc4f7..ac3145a 100644 (file)
  * is almost entirely format based.
  */
 
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
+
 #include <sys/types.h>
 #include <sys/stat.h>
 
@@ -123,7 +127,7 @@ const char *_mutt_fmt_pgp_command (char *dest,
        snprintf (fmt, sizeof (fmt), "%%%ss", prefix);
        snprintf (dest, destlen, fmt, cctx->need_passphrase ? "PGPPASSFD=0" : "");
       }
-      else if (!cctx->need_passphrase)
+      else if (!cctx->need_passphrase || pgp_use_gpg_agent())
        optional = 0;
       break;
     }