us-dist: us-distdir
for file in $(distdir)-us/*.c $(distdir)-us/*.h ; do \
- $(srcdir)/reap.pl _PGPPATH < $$file | $(srcdir)/reap.pl MIXMASTER | $(srcdir)/reap.pl USE_SSL > $$file.n && rm $$file && mv $$file.n $$file ; \
+ $(srcdir)/reap.pl HAVE_PGP < $$file | $(srcdir)/reap.pl MIXMASTER | $(srcdir)/reap.pl USE_SSL > $$file.n && rm $$file && mv $$file.n $$file ; \
done
for file in $(non_us_sources) ; do \
echo "/* This file is only available in the international mutt version */" \
/* Enable debugging info */
#define DEBUG
-/* Does your version of PGP support the PGPPASSFD environment variable? */
-#define HAVE_PGPPASSFD
-
/* What is your domain name? */
#undef DOMAIN
/* Where to find sendmail on your system */
#undef SENDMAIL
-/* Where is PGP located on your system? */
-#undef _PGPPATH
-
-/* Where is PGP 2.* located on your system? */
-#undef _PGPV2PATH
-
-/* Where is PGP 5 located on your system? */
-#undef _PGPV3PATH
-
-/* Where is GNU Privacy Guard located on your system? */
-#undef _PGPGPGPATH
-
-/* Do we have PGP 2.*? */
-#undef HAVE_PGP2
-
-/* Do we have PGP 5.0 or up? */
-#undef HAVE_PGP5
-
-/* Do we have GPG? */
-#undef HAVE_GPG
+/* Do you want PGP support (--enable-pgp)? */
+#undef HAVE_PGP
/* Where to find ispell on your system? */
#undef ISPELL
#include "copy.h"
#include "mx.h"
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
#include "pgp.h"
#endif
int unlink_tempfile = 0;
is_message = mutt_is_message_type(a->type, a->subtype);
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
if (is_message && a->hdr && (a->hdr->pgp & PGPENCRYPT) && !pgp_valid_passphrase())
return (rc);
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
use_mailcap = (flag == M_MAILCAP ||
(flag == M_REGULAR && mutt_needs_mailcap (a)));
snprintf (type, sizeof (type), "%s/%s", TYPE (a), a->subtype);
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
#include "pgp.h"
#endif
mutt_parse_mime_message (Context, cur);
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
/* see if PGP is needed for this message. if so, we should exit curses */
if (cur->pgp)
{
return (0);
}
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
/* update PGP information for this message */
cur->pgp |= pgp_query (cur->content);
#endif
{
pager_t info;
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
if (cur->pgp & PGPGOODSIGN)
mutt_message _("PGP signature successfully verified.");
#endif
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
if (option (OPTPIPEDECODE))
{
mutt_parse_mime_message (Context, h);
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
if(option(OPTPIPEDECODE))
{
*cmflags = 0;
*chflags = CH_UPDATE_LEN;
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
if (!decode && decrypt && (hdr->pgp & PGPENCRYPT))
{
if (mutt_is_multipart_encrypted(hdr->content))
int decode, int decrypt, int *redraw)
{
int i, need_buffy_cleanup;
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
int need_passphrase = 0;
#endif
char prompt[SHORT_STRING], buf[_POSIX_PATH_MAX];
if (h)
{
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
need_passphrase = h->pgp & PGPENCRYPT;
#endif
mutt_default_save (buf, sizeof (buf), h);
if (h)
{
mutt_default_save (buf, sizeof (buf), h);
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
need_passphrase |= h->pgp & PGPENCRYPT;
#endif
h = NULL;
return (-1);
}
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
if(need_passphrase && (decode || decrypt) && !pgp_valid_passphrase())
return -1;
#endif
chflags |= CH_WEED;
}
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
if (h->pgp & PGPENCRYPT)
{
if (!pgp_valid_passphrase ())
mutt_free_header (&b->hdr);
}
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
if (h)
{
if (h->content == b)
h->pgp = 0;
h->pgp |= pgp_query (b);
}
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
}
HDR_MIX,
#endif
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
HDR_PGP,
HDR_PGPSIGINFO,
#endif
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
#include "pgp.h"
static void redraw_pgp_lines (int pgp)
redraw_pgp_lines (bits);
return (bits);
}
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
#ifdef MIXMASTER
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
redraw_pgp_lines (msg->pgp);
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
#ifdef MIXMASTER
redraw_mix_line (msg->chain);
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
case OP_COMPOSE_ATTACH_KEY:
if (idxlen == idxmax)
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
case OP_COMPOSE_PGP_MENU:
msg->pgp = pgp_send_menu (msg->pgp, &menu->redraw);
mutt_forget_passphrase ();
break;
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
#ifdef MIXMASTER
SUBVERSION="us"
else
SUBVERSION="i"
- PGPPATH=no
- AC_PATH_PROG(GPG, gpg, no)
- if test $GPG != no ; then
- AC_DEFINE_UNQUOTED(_PGPGPGPATH, "$GPG")
- PGPPATH="$GPG"
- AC_DEFINE(HAVE_GPG)
- fi
-
- AC_PATH_PROG(PGPK, pgpk, no)
- if test $PGPK != no ; then
- PGPK=`echo $PGPK | sed 's,.$,,'`
- AC_DEFINE_UNQUOTED(_PGPV3PATH, "$PGPK")
- PGPPATH="$PGPK"
- AC_DEFINE(HAVE_PGP5)
- fi
-
- AC_PATH_PROG(PGP, pgp, no)
- if test $PGP != no ; then
- AC_DEFINE_UNQUOTED(_PGPV2PATH, "$PGP")
- PGPPATH="$PGP"
- AC_DEFINE(HAVE_PGP2)
- fi
-
- if test $PGPPATH != no ; then
- AC_DEFINE_UNQUOTED(_PGPPATH, "$PGPPATH")
- fi
+ AC_ARG_ENABLE(pgp, [ --disable-pgp Disable PGP support],
+ [ if test x$enableval = xno ; then
+ HAVE_PGP=no
+ fi
+ ])
- if test $PGP != no || test $PGPK != no || test $GPG != no ; then
+ if test x$HAVE_PGP != xno ; then
+ AC_DEFINE(HAVE_PGP)
PGPAUX_TARGET=pgpring
AM_CONDITIONAL(NEEDS_PGPEWRAP, true)
MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS pgp.o pgpinvoke.o pgpkey.o pgplib.o gnupgparse.o"
#include "parse.h"
#include "mime.h"
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
#include "pgp.h"
#endif
if (flags & M_CM_CHARCONV)
s.flags |= M_CHARCONV;
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
if (flags & M_CM_VERIFY)
s.flags |= M_VERIFY;
#endif
mutt_body_handler (body, &s);
}
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
else if ((flags & M_CM_DECODE_PGP) && (hdr->pgp & PGPENCRYPT) &&
hdr->content->type == TYPEMULTIPART)
{
#define M_CM_CHARCONV (1<<6) /* perform character set conversions */
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
#define M_CM_DECODE_PGP (1<<7) /* used for decoding PGP messages */
#define M_CM_VERIFY (1<<8) /* do signature verification */
#endif
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
#include "pgp.h"
#endif
case OP_SAVE:
case OP_DECODE_COPY:
case OP_DECODE_SAVE:
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
case OP_DECRYPT_COPY:
case OP_DECRYPT_SAVE:
#endif
CHECK_MSGCOUNT;
if (mutt_save_message (tag ? NULL : CURHDR,
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
(op == OP_DECRYPT_SAVE) ||
#endif
(op == OP_SAVE) || (op == OP_DECODE_SAVE),
(op == OP_DECODE_SAVE) || (op == OP_DECODE_COPY),
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
(op == OP_DECRYPT_SAVE) || (op == OP_DECRYPT_COPY) ||
#endif
0,
&menu->redraw) == 0 &&
(op == OP_SAVE || op == OP_DECODE_SAVE
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
|| op == OP_DECRYPT_SAVE
#endif
))
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
case OP_FORGET_PASSPHRASE:
mutt_forget_passphrase ();
break;
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
case OP_MAIL_KEY:
CHECK_ATTACH;
menu->redraw = REDRAW_FULL;
break;
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
{ "parent-message", OP_MAIN_PARENT_MESSAGE, "P" },
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
{ "extract-keys", OP_EXTRACT_KEYS, "\013" },
{ "forget-passphrase", OP_FORGET_PASSPHRASE, "\006" },
{ "mail-key", OP_MAIL_KEY, "\033k" },
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
{ "extract-keys", OP_EXTRACT_KEYS, "\013" },
{ "forget-passphrase",OP_FORGET_PASSPHRASE, "\006" },
{ "mail-key", OP_MAIL_KEY, "\033k" },
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
{ "extract-keys", OP_EXTRACT_KEYS, "\013" },
#endif
{ "send-message", OP_COMPOSE_SEND_MESSAGE, "y" },
{ "pipe-entry", OP_PIPE, "|" },
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
{ "attach-key", OP_COMPOSE_ATTACH_KEY, "\033k" },
{ "forget-passphrase",OP_FORGET_PASSPHRASE, "\006" },
{ "pgp-menu", OP_COMPOSE_PGP_MENU, "p" },
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
struct binding_t OpPgp[] = {
{ "verify-key", OP_VERIFY_KEY, "c" },
{ "view-name", OP_VIEW_ID, "%" },
{ NULL, 0, NULL }
};
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
#ifdef MIXMASTER
#include "mutt_regex.h"
#include "buffy.h"
#include "sort.h"
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
#include "pgp.h"
#endif
#endif /* MAIN_C */
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
#include "pgp.h"
#endif
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
if (mutt_strcasecmp (a->subtype, "signed") == 0 ||
mutt_strcasecmp (a->subtype, "encrypted") == 0)
return (1);
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
else if (a->type == TYPEAPPLICATION)
{
if (mutt_is_application_pgp(a))
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
char *p;
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
else if (mutt_strcasecmp ("signed", b->subtype) == 0)
{
p = mutt_get_parameter ("protocol", b->parameter);
else if (mutt_strcasecmp ("application/pgp-encrypted", p) == 0)
handler = pgp_encrypted_handler;
}
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
else if (b->type == TYPEAPPLICATION)
{
if (mutt_is_application_pgp(b))
handler = pgp_application_pgp_handler;
}
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
#include "sort.h"
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
#include "pgp.h"
#endif
ch = ' ';
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
if (hdr->pgp & PGPGOODSIGN)
ch = 'S';
else if (hdr->pgp & PGPENCRYPT)
#include "mutt.h"
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
#include "pgp.h"
#endif
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
else if (mutt_strncasecmp ("pgp:", cur->data, 4) == 0)
{
msg->pgp = mutt_parse_pgp_hdr (cur->data + 4, 0);
pattern.data = safe_strdup (path);
}
else if (DefaultHook && !(data & M_CHARSETHOOK)
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
&& !(data & M_PGPHOOK)
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
)
{
char tmp[HUGE_STRING];
if ((rc = REGCOMP (rx, pattern.data, ((data & (M_PGPHOOK|M_CHARSETHOOK)) ? REG_ICASE : 0))) != 0)
#else
if ((rc = REGCOMP (rx, pattern.data, (data & M_CHARSETHOOK) ? REG_ICASE : 0)) != 0)
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
{
regerror (rc, rx, err->data, err->dsize);
regfree (rx);
return _mutt_string_hook (chs, M_CHARSETHOOK);
}
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
char *mutt_pgp_hook (ADDRESS *adr)
{
return _mutt_string_hook (adr->mailbox, M_PGPHOOK);
}
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
#include "message.h"
#include "mx.h"
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
#include "pgp.h"
#endif
ctx->hdrs[msgno]->content->offset;
/* This needs to be done in case this is a multipart message */
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
ctx->hdrs[msgno]->pgp = pgp_query (ctx->hdrs[msgno]->content);
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
mutt_clear_error();
rewind (msg->fp);
#include "keymap.h"
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
#include "pgp.h"
#endif
case DT_SORT_BROWSER:
map = SortBrowserMethods;
break;
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
case DT_SORT_KEYS:
map = SortKeyMethods;
break;
case DT_SORT_BROWSER:
map = SortBrowserMethods;
break;
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
case DT_SORT_KEYS:
map = SortKeyMethods;
break;
# ifndef MIXMASTER
# define MIXMASTER "mixmaster"
# endif
-# ifndef _PGPPATH
-# define _PGPPATH
+# ifndef HAVE_PGP
+# define HAVE_PGP
# endif
# ifndef USE_POP
# define USE_POP
** This variable controls whether or not attachments on outgoing messages
** are saved along with the main body of your message.
*/
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
{ "fcc_clear", DT_BOOL, R_NONE, OPTFCCCLEAR, 0 },
/*
** .pp
*/
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
{ "pgp_autosign", DT_BOOL, R_NONE, OPTPGPAUTOSIGN, 0 },
/*
{ "forw_decrypt", DT_SYN, R_NONE, UL "forward_decrypt", 0 },
/*
*/
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
#ifdef USE_SSL
{ "certificate_file", DT_PATH, R_NONE, UL &SslCertFile, 0 },
{ NULL }
};
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
const struct mapping_t SortKeyMethods[] = {
{ "address", SORT_ADDRESS },
{ "date", SORT_DATE },
{ "trust", SORT_TRUST },
{ NULL }
};
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
/* functions used to parse commands in a rc file */
{ "mbox-hook", mutt_parse_hook, M_MBOXHOOK },
{ "mono", mutt_parse_mono, 0 },
{ "my_hdr", parse_my_hdr, 0 },
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
{ "pgp-hook", mutt_parse_hook, M_PGPHOOK },
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
{ "push", mutt_parse_push, 0 },
{ "reset", parse_set, M_SET_RESET },
{ "save-hook", mutt_parse_hook, M_SAVEHOOK },
{ "postpone", MENU_POST },
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
{ "pgp", MENU_PGP },
#endif
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
create_bindings (OpPgp, MENU_PGP);
#endif
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
case MENU_PGP:
return OpPgp;
#endif
MENU_QUERY,
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
MENU_PGP,
#endif
extern struct binding_t OpEditor[];
extern struct binding_t OpQuery[];
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
extern struct binding_t OpPgp[];
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
#ifdef MIXMASTER
extern struct binding_t OpMix[];
along with this program; if not, write to the Free Software\n\
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n\
");
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
const char* ShaCopyright = N_("\n\
SHA1 implementation Copyright (C) 1995-1997 Eric A. Young <eay@cryptsoft.com>\n\
"-HAVE_COLOR "
#endif
-#ifdef _PGPPATH
-
-#ifdef HAVE_PGP5
- "+HAVE_PGP5 "
-#endif
-#ifdef HAVE_PGP2
- "+HAVE_PGP2 "
-#endif
-#ifdef HAVE_GPG
- "+HAVE_GPG "
-#endif
- "\n"
+#ifdef HAVE_PGP
+ "+HAVE_PGP "
+#else
+ "-HAVE_PGP "
#endif
-
-
#ifdef BUFFY_SIZE
"+BUFFY_SIZE "
#else
puts ("-ISPELL");
#endif
-
-
-#ifdef _PGPPATH
- printf ("_PGPPATH=\"%s\"\n", _PGPPATH);
-# ifdef _PGPV2PATH
- printf ("_PGPV2PATH=\"%s\"\n", _PGPV2PATH);
-# endif
-# ifdef _PGPV3PATH
- printf ("_PGPV3PATH=\"%s\"\n", _PGPV3PATH);
-# endif
-# ifdef _PGPGPGPATH
- printf ("_PGPGPGPATH=\"%s\"\n", _PGPGPGPATH);
-# endif
-#endif
-
-
puts(_(ReachingUs));
exit (0);
default:
printf ("Mutt %s (%s)\n", MUTT_VERSION, ReleaseDate);
puts (_(Copyright));
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
puts(_(ShaCopyright));
#endif
puts (_(ReachingUs));
#define M_FCCHOOK (1<<3)
#define M_SAVEHOOK (1<<4)
#define M_CHARSETHOOK (1<<5)
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
#define M_PGPHOOK (1<<6)
#endif
M_PERSONAL_RECIP,
M_PERSONAL_FROM,
M_ADDRESS,
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
M_PGP_SIGN,
M_PGP_ENCRYPT,
M_PGP_KEY,
enum
{
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
OPT_VERIFYSIG, /* verify PGP signatures */
OPT_PGPTRADITIONAL, /* create old-style PGP messages */
#endif
/* PGP options */
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
OPTPGPAUTOSIGN,
OPTPGPAUTOENCRYPT,
OPTPGPLONGIDS,
* external program.
*/
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
OPTPGPCHECKTRUST, /* (pseudo) used by pgp_select_key () */
OPTDONTHANDLEPGPKEYS, /* (pseudo) used to extract PGP keys */
#endif
unsigned int deleted : 1; /* attachment marked for deletion */
unsigned int noconv : 1; /* don't do character set conversion */
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
unsigned int goodsig : 1; /* good PGP signature */
#endif
typedef struct header
{
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
unsigned int pgp : 4;
#endif
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
#define M_VERIFY (1<<1) /* perform signature verification */
#endif
#include "mailbox.h"
#include "mx.h"
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
#include "pgp.h"
#endif
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
case TYPEAPPLICATION:
if(mutt_is_application_pgp(m))
return 0;
break;
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
case TYPEMULTIPART:
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
if (t == TYPEAPPLICATION)
{
if (!mutt_strcasecmp ("pgp-keys", s))
return 1;
}
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
#include "keymap.h"
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
#include "pgp.h"
#endif
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
/* NOTE: this _must_ be done before the check for mailcap! */
h->pgp = pgp_query (h->content);
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
if (!ctx->pattern)
{
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
#include "pgp.h"
#endif
redraw = REDRAW_FULL;
break;
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
case OP_DECRYPT_SAVE:
#endif
case OP_SAVE:
case OP_COPY_MESSAGE:
case OP_DECODE_SAVE:
case OP_DECODE_COPY:
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
case OP_DECRYPT_COPY:
#endif
CHECK_MODE(IsHeader (extra));
if (mutt_save_message (extra->hdr,
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
(ch == OP_DECRYPT_SAVE) ||
#endif
(ch == OP_SAVE) || (ch == OP_DECODE_SAVE),
(ch == OP_DECODE_SAVE) || (ch == OP_DECODE_COPY),
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
(ch == OP_DECRYPT_SAVE) || (ch == OP_DECRYPT_COPY) ||
#endif
0,
&redraw) == 0 && (ch == OP_SAVE || ch == OP_DECODE_SAVE
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
|| ch == OP_DECRYPT_SAVE
#endif
))
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
case OP_FORGET_PASSPHRASE:
mutt_forget_passphrase ();
break;
pgp_extract_keys_from_messages(extra->hdr);
redraw = REDRAW_FULL;
break;
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
#include "rfc2231.h"
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
#include "pgp.h"
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
mutt_parse_part (msg->fp, cur->content);
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
cur->pgp = pgp_query (cur->content);
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
mx_close_message (&msg);
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
#include "pgp.h"
#endif
{ 'E', M_EXPIRED, 0, NULL },
{ 'f', M_FROM, 0, eat_regexp },
{ 'F', M_FLAG, 0, NULL },
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
{ 'g', M_PGP_SIGN, 0, NULL },
{ 'G', M_PGP_ENCRYPT, 0, NULL },
#endif
{ 'h', M_HEADER, M_FULL_MSG, eat_regexp },
{ 'i', M_ID, 0, eat_regexp },
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
{ 'k', M_PGP_KEY, 0, NULL },
#endif
{ 'L', M_ADDRESS, 0, eat_regexp },
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
if (h->pgp & PGPENCRYPT && !pgp_valid_passphrase())
{
mx_close_message (&msg);
return (pat->not ^ match_user (pat->alladdr, h->env->from, NULL));
case M_COLLAPSED:
return (pat->not ^ (h->collapsed && h->num_hidden > 1));
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
case M_PGP_SIGN:
return (pat->not ^ (h->pgp & PGPSIGN));
case M_PGP_ENCRYPT:
# include <sys/resource.h>
#endif
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
char PgpPass[STRING];
return (0);
}
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
#include "pgplib.h"
void pgp_invoke_import (const char *fname);
void pgp_invoke_getkeys (ADDRESS *);
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
#include <locale.h>
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
struct pgp_cache
{
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
#define PGPENCRYPT (1 << 0)
#define PGPSIGN (1 << 1)
#define pgp_new_keyinfo() safe_calloc (sizeof (pgp_key_t), 1)
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
#include "pgp.h"
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
static short PostCount = 0;
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
else if (mutt_strncmp ("Pgp:", tmp->data, 4) == 0 /* this is generated
* by old mutt versions
*/
mutt_free_list (&tmp);
tmp = next;
}
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
#ifdef MIXMASTER
else if (mutt_strncmp ("X-Mutt-Mix:", tmp->data, 11) == 0)
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
int mutt_parse_pgp_hdr (char *p, int set_signas)
{
return pgp;
}
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
int mutt_prepare_template (FILE *fp, CONTEXT *ctx, HEADER *newhdr, HEADER *hdr,
short weed)
safe_free ((void **) &newhdr->env->message_id);
safe_free ((void **) &newhdr->env->mail_followup_to);
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
/* decrypt pgp/mime encoded messages */
if ((hdr->pgp & PGPENCRYPT) &&
mutt_is_multipart_encrypted (newhdr->content))
char *mutt_get_name (ADDRESS *);
char *mutt_get_parameter (const char *, PARAMETER *);
char *mutt_get_send_charset (char *, size_t, BODY *, short);
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
char *mutt_pgp_hook (ADDRESS *);
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
char *mutt_make_date (char *, size_t);
const char *mutt_fqdn(short);
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
#include "pgp.h"
#endif
if (m->type == TYPEMULTIPART && m->parts
&& (compose || (parent_type == -1 && mutt_strcasecmp ("alternative", m->subtype)))
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
&& !mutt_is_multipart_encrypted(m)
#endif
)
/* We don't support multipart messages in the compose menu yet */
if (!compose &&
((m->type == TYPEMULTIPART
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
&& !mutt_is_multipart_encrypted (m)
#endif
)
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
int pgp = 0;
#endif
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
if((hdr->pgp & PGPENCRYPT) && !pgp_valid_passphrase())
{
mx_close_message (&msg);
pgp = 1;
}
else
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
{
fp = msg->fp;
cur = hdr->content;
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
case OP_EXTRACT_KEYS:
pgp_extract_keys_from_attachment_list (fp, menu->tagprefix,
menu->tagprefix ? cur : idx[menu->current]->content);
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
if (hdr->pgp)
{
mutt_message _(
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
if (pgp)
{
fclose (fp);
mutt_free_body (&cur);
}
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
#include <sys/wait.h>
#include <dirent.h>
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
#include "pgp.h"
#endif
int chflags = CH_DECODE, cmflags = 0;
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
if ((cur->pgp & PGPENCRYPT) && option (OPTFORWDECODE))
{
/* make sure we have the user's passphrase before proceeding... */
pgp_valid_passphrase ();
}
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
mutt_forward_intro (out, cur);
int cmflags = M_CM_PREFIX | M_CM_DECODE | M_CM_CHARCONV;
int chflags = CH_DECODE;
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
if (cur->pgp)
{
if (cur->pgp & PGPENCRYPT)
pgp_valid_passphrase ();
}
}
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
mutt_make_attribution (ctx, cur, out);
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
else if (flags & SENDKEY)
{
BODY *tmp;
BODY *pbody;
int i, killfrom = 0;
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
BODY *save_content = NULL;
BODY *clear_content = NULL;
char *pgpkeylist = NULL;
}
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
if (flags & SENDPOSTPONED)
{
signas = safe_strdup(PgpSignAs);
signmic = safe_strdup(PgpSignMicalg);
}
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
if (msg)
{
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
if (! (flags & SENDMAILX))
{
if (option (OPTPGPAUTOSIGN))
if (option (OPTPGPREPLYSIGNENCRYPTED) && cur && cur->pgp & PGPENCRYPT)
msg->pgp |= PGPSIGN;
}
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
if (! (flags & SENDKEY) && tempfp)
{
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
}
* in case of error. Ugh.
*/
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
if (msg->pgp)
{
/* save the decrypted attachments */
* - something else. In this case, it's the same as clear_content.
*/
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
if (!option (OPTNOCURSES) && !(flags & SENDMAILX))
mutt_message _("Sending message...");
if (*fcc && mutt_strcmp ("/dev/null", fcc) != 0)
{
BODY *tmpbody = msg->content;
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
BODY *save_sig = NULL;
BODY *save_parts = NULL;
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
if (msg->pgp && option (OPTFCCCLEAR))
msg->content = clear_content;
#endif
/* check to see if the user wants copies of all attachments */
if (!option (OPTFCCATTACH) && msg->content->type == TYPEMULTIPART)
{
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
if (mutt_strcmp (msg->content->subtype, "encrypted") == 0 ||
mutt_strcmp (msg->content->subtype, "signed") == 0)
{
}
}
else
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
msg->content = msg->content->parts;
}
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
full_fcc:
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
if (msg->content)
mutt_write_fcc (fcc, msg, NULL, 0, NULL);
msg->content = tmpbody;
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
if (save_sig)
{
/* cleanup the second signature structures */
mutt_free_body (&save_content);
}
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
}
{
if (!(flags & SENDBATCH))
{
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
if ((msg->pgp & PGPENCRYPT) ||
((msg->pgp & PGPSIGN) && msg->content->type == TYPEAPPLICATION))
{
else if (!option (OPTNOCURSES) && ! (flags & SENDMAILX))
mutt_message (i == 0 ? _("Mail sent.") : _("Sending in background."));
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
if (msg->pgp & PGPENCRYPT)
{
/* cleanup structures from the first encryption */
mutt_free_body (&clear_content);
FREE (&pgpkeylist);
}
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
if (flags & SENDREPLY)
{
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
if (flags & SENDPOSTPONED)
{
PgpSignMicalg = signmic;
}
}
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
if (tempfp)
fclose (tempfp);
};
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
#include "pgp.h"
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
/* This is pretty gross, but it's the best solution for now... */
if (a->type == TYPEAPPLICATION && mutt_strcmp (a->subtype, "pgp-encrypted") == 0)
{
fputs ("Version: 1\n", f);
return 0;
}
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
if (a->type == TYPETEXT)
mutt_set_body_charset(a, get_text_charset(a, info));
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
/* save the info in case this message is signed. we will want to do Q-P
* encoding if any lines begin with "From " so the signature won't be munged,
* for example.
BODY *body;
FILE *fp;
int cmflags, chflags;
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
int pgp = hdr->pgp;
#endif
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
if ((option(OPTMIMEFORWDECODE) || option(OPTFORWDECRYPT)) &&
(hdr->pgp & PGPENCRYPT) && !pgp_valid_passphrase())
return (NULL);
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
mutt_mktemp (buffer);
if ((fp = safe_fopen (buffer, "w+")) == NULL)
{
chflags |= CH_MIME | CH_TXTPLAIN;
cmflags = M_CM_DECODE | M_CM_CHARCONV;
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
pgp &= ~PGPENCRYPT;
#endif
}
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
else
if (option (OPTFORWDECRYPT)
&& (hdr->pgp & PGPENCRYPT))
body->hdr->offset = 0;
/* we don't need the user headers here */
body->hdr->env = mutt_read_rfc822_header(fp, body->hdr, 0, 0);
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
body->hdr->pgp = pgp;
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
mutt_update_encoding (body);
body->parts = body->hdr->content;
if (att->type == TYPETEXT)
mutt_set_body_charset(att, get_text_charset(att, info));
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
/*
* save the info in case this message is signed. we will want to do Q-P
* encoding if any lines begin with "From " so the signature won't be munged,
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
/* (postponment) if the mail is to be signed or encrypted, save this info */
if (post && (hdr->pgp & (PGPENCRYPT | PGPSIGN)))
{
}
fputc ('\n', msg->fp);
}
-#endif /* _PGPPATH */
+#endif /* HAVE_PGP */
#ifdef MIXMASTER
/* (postponement) if the mail is to be sent through a mixmaster
WHERE short Sort INITVAL (SORT_DATE);
WHERE short SortAux INITVAL (SORT_DATE); /* auxiallary sorting method */
WHERE short SortAlias INITVAL (SORT_ALIAS);
-#ifdef _PGPPATH
+#ifdef HAVE_PGP
WHERE short PgpSortKeys INITVAL (SORT_ADDRESS);
#endif