# include "config.h"
#endif
-#include <lib-lib/str.h>
-#include <lib-lib/file.h>
-#include <lib-lib/ascii.h>
-#include <lib-lib/mem.h>
-#include <lib-lib/macros.h>
-
-#include <lib-mime/mime.h>
-
-#include "mutt.h"
-#include "handler.h"
-#include "mutt_curses.h"
-#include "copy.h"
-#include "crypt.h"
-#include "pgp.h"
-
-
#include <sys/wait.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#ifdef HAVE_LOCALE_H
-#include <locale.h>
+# include <locale.h>
#endif
-
#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
+# include <sys/time.h>
#endif
-
#ifdef HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
+# include <sys/resource.h>
#endif
+#include <lib-lib/str.h>
+#include <lib-lib/file.h>
+#include <lib-lib/ascii.h>
+#include <lib-lib/mem.h>
+#include <lib-lib/macros.h>
+
+#include <lib-mime/mime.h>
+
+#include <lib-ui/curses.h>
+
+#include "mutt.h"
+#include "alias.h"
+#include "handler.h"
+#include "copy.h"
+#include "crypt.h"
+#include "pgp.h"
/* print the current time to avoid spoofing of the signature output */
void crypt_current_time (STATE * s, const char *app_name)
}
-#if defined(HAVE_SETRLIMIT) && (!defined(DEBUG))
+#if defined(HAVE_SETRLIMIT)
static void disable_coredumps (void)
{
{
int ret = 0;
-# if defined(HAVE_SETRLIMIT) &&(!defined(DEBUG))
+# if defined(HAVE_SETRLIMIT)
disable_coredumps ();
# endif
!b->subtype || ascii_strcasecmp (b->subtype, "signed"))
return 0;
- if (!(p = mutt_get_parameter ("protocol", b->parameter)))
+ if (!(p = parameter_getval(b->parameter, "protocol")))
return 0;
if (!(ascii_strcasecmp (p, "multipart/mixed")))
if (!b || b->type != TYPEMULTIPART ||
!b->subtype || ascii_strcasecmp (b->subtype, "encrypted") ||
- !(p = mutt_get_parameter ("protocol", b->parameter)) ||
+ !(p = parameter_getval(b->parameter, "protocol")) ||
ascii_strcasecmp (p, "application/pgp-encrypted"))
return 0;
if (m->type == TYPEAPPLICATION) {
if (!ascii_strcasecmp (m->subtype, "pgp")
|| !ascii_strcasecmp (m->subtype, "x-pgp-message")) {
- if ((p = mutt_get_parameter ("x-action", m->parameter))
+ if ((p = parameter_getval(m->parameter, "x-action"))
&& (!ascii_strcasecmp (p, "sign")
|| !ascii_strcasecmp (p, "signclear")))
t |= PGPSIGN;
- if ((p = mutt_get_parameter ("format", m->parameter)) &&
+ if ((p = parameter_getval(m->parameter, "format")) &&
!ascii_strcasecmp (p, "keys-only"))
t |= PGPKEY;
t |= PGPKEY;
}
else if (m->type == TYPETEXT && ascii_strcasecmp ("plain", m->subtype) == 0) {
- if (((p = mutt_get_parameter ("x-mutt-action", m->parameter))
- || (p = mutt_get_parameter ("x-action", m->parameter))
- || (p = mutt_get_parameter ("action", m->parameter)))
+ if (((p = parameter_getval(m->parameter, "x-mutt-action"))
+ || (p = parameter_getval(m->parameter, "x-action"))
+ || (p = parameter_getval(m->parameter, "action")))
&& !ascii_strncasecmp ("pgp-sign", p, 8))
t |= PGPSIGN;
else if (p && !ascii_strncasecmp ("pgp-encrypt", p, 11))
/* S/MIME MIME types don't need x- anymore, see RFC2311 */
if (!ascii_strcasecmp (m->subtype, "x-pkcs7-mime") ||
!ascii_strcasecmp (m->subtype, "pkcs7-mime")) {
- if ((t = mutt_get_parameter ("smime-type", m->parameter))) {
+ if ((t = parameter_getval(m->parameter, "smime-type"))) {
if (!ascii_strcasecmp (t, "enveloped-data"))
return SMIMEENCRYPT;
else if (!ascii_strcasecmp (t, "signed-data"))
else if (ascii_strcasecmp (m->subtype, "octet-stream"))
return 0;
- t = mutt_get_parameter ("name", m->parameter);
+ t = parameter_getval(m->parameter, "name");
if (!t)
t = m->d_filename;
short goodsig = 1;
int rc = 0;
- protocol = mutt_get_parameter ("protocol", a->parameter);
+ protocol = parameter_getval(a->parameter, "protocol");
a = a->parts;
/* extract the protocol information */