#include <lib-lib/lib-lib.h>
-#include <sys/types.h>
#ifdef HAVE_LANGINFO_CODESET
# include <langinfo.h>
#endif
* encoding name, hence you have to pass a charset stripped from its '-' and
* '_' and truncated at the first ':' encountered.
*/
+
+static const struct cset_pair *
+charset_canonicalize_aux(const char *str, unsigned int len);
%}
struct cset_pair { const char *name; const char *pref; };
%%
#include <lib-ui/enter.h>
#include <lib-ui/menu.h>
-#include "mutt.h"
#include "lib.h"
#include "alias.h"
#include <lib-crypt/crypt.h>
#ifndef CRYPTOGRAPHY_H
#define CRYPTOGRAPHY_H
-#include "mutt.h"
+#include <lib-mime/mime.h>
#include "crypt.h"
/*
#include <lib-ui/curses.h>
-#include "mutt.h"
+#include "mx.h"
#include "alias.h"
#include "handler.h"
#include "copy.h"
#ifndef MUTT_CRYPT_H
#define MUTT_CRYPT_H
-#include "mutt.h" /* Need this to declare BODY, address_t. STATE etc. */
+#include <lib-mime/mime.h>
#include "state.h"
/* FIXME: They should be pointer to anonymous structures for better
information hiding. */
-
#define ENCRYPT (1 << 0)
#define SIGN (1 << 1)
#define GOODSIGN (1 << 2)
return (-1);
}
-/* MIME handler for an PGP/MIME encrypted message. */
-int crypt_smime_encrypted_handler (BODY * a, STATE * s)
-{
- if (CRYPT_MOD_CALL_CHECK (SMIME, encrypted_handler))
- return (CRYPT_MOD_CALL (SMIME, encrypted_handler)) (a, s);
- return (-1);
-}
-
/* fixme: Needs documentation. */
void crypt_smime_getkeys (ENVELOPE * env)
{
#include <lib-sys/unix.h>
#include <lib-ui/curses.h>
-#include "mutt.h"
#include "pgp.h"
#include "charset.h"
#endif
#include <lib-mime/mime.h>
+#include <lib-sys/unix.h>
#include <lib-ui/curses.h>
#include <lib-ui/enter.h>
#include <lib-ui/menu.h>
-#include "mutt.h"
+#include "mx.h"
#include "handler.h"
#include "pgp.h"
#include "copy.h"
/* Extract pgp public keys from messages or attachments */
-void pgp_extract_keys_from_messages (HEADER * h)
-{
- int i;
- char tempfname[_POSIX_PATH_MAX];
- FILE *fpout;
-
- if (h) {
- mutt_parse_mime_message (Context, h);
- if (h->security & PGPENCRYPT && !pgp_valid_passphrase ())
- return;
- }
-
- mutt_mktemp (tempfname);
- if (!(fpout = safe_fopen (tempfname, "w"))) {
- mutt_perror (tempfname);
- return;
- }
-
- set_option (OPTDONTHANDLEPGPKEYS);
-
- if (!h) {
- for (i = 0; i < Context->vcount; i++) {
- if (Context->hdrs[Context->v2r[i]]->tagged) {
- mutt_parse_mime_message (Context, Context->hdrs[Context->v2r[i]]);
- if (Context->hdrs[Context->v2r[i]]->security & PGPENCRYPT
- && !pgp_valid_passphrase ()) {
- fclose (fpout);
- goto bailout;
- }
- mutt_copy_message (fpout, Context, Context->hdrs[Context->v2r[i]],
- M_CM_DECODE | M_CM_CHARCONV, 0);
- }
- }
- }
- else {
- mutt_parse_mime_message (Context, h);
- if (h->security & PGPENCRYPT && !pgp_valid_passphrase ()) {
- fclose (fpout);
- goto bailout;
- }
- mutt_copy_message (fpout, Context, h, M_CM_DECODE | M_CM_CHARCONV, 0);
- }
-
- fclose (fpout);
- mutt_endwin (NULL);
- pgp_invoke_import (tempfname);
- mutt_any_key_to_continue (NULL);
-
-bailout:
-
- mutt_unlink (tempfname);
- unset_option (OPTDONTHANDLEPGPKEYS);
-
-}
-
static void pgp_extract_keys_from_attachment (FILE * fp, BODY * top)
{
STATE s;
if (fqdn)
rfc822_qualify (tmp, fqdn);
- address_list_uniq(&tmp);
+ address_list_uniq(tmp);
for (p = tmp; p; p = p->next) {
char buf[LONG_STRING];
#include <lib-lib/lib-lib.h>
#include <lib-sys/unix.h>
-
#include <lib-mime/mime.h>
-
#include <lib-ui/curses.h>
-#include "mutt.h"
#include "mutt_idna.h"
#include "pgp.h"
};
-const char *
+static const char *
_mutt_fmt_pgp_command(char *dest, ssize_t destlen,
char op, const char *src, const char *prefix,
const char *ifstring, const char *elsestring,
return (src);
}
-void mutt_pgp_command (char *d, ssize_t dlen, struct pgp_command_context *cctx,
- const char *fmt)
+static void
+mutt_pgp_command(char *d, ssize_t dlen, struct pgp_command_context *cctx,
+ const char *fmt)
{
mutt_FormatString (d, dlen, NONULL (fmt), _mutt_fmt_pgp_command,
(unsigned long) cctx, 0);
#include <lib-lib/lib-lib.h>
#include <lib-mime/mime.h>
+#include <lib-sys/unix.h>
#include <lib-ui/curses.h>
#include <lib-ui/enter.h>
#include <lib-ui/menu.h>
-#include "mutt.h"
#include "recvattach.h"
#include "pgp.h"
#include "pager.h"
#include <lib-lib/lib-lib.h>
-#include "mutt.h"
#include "lib.h"
#include "pgplib.h"
return (pgp_canencrypt (type) << 1) | pgp_cansign (type);
}
-void pgp_free_sig (pgp_sig_t ** sigp)
+static void pgp_free_sig (pgp_sig_t ** sigp)
{
pgp_sig_t *sp, *q;
*sigp = NULL;
}
-void pgp_free_uid (pgp_uid_t ** upp)
+static void pgp_free_uid (pgp_uid_t ** upp)
{
pgp_uid_t *up, *q;
#include <lib-lib/lib-lib.h>
-#include "mutt.h"
+#include <lib-mime/mime.h>
+#include <lib-ui/curses.h>
+
#include "handler.h"
#include "pgp.h"
#include "pgppacket.h"
#include "charset.h"
-#include <lib-ui/curses.h>
-
-#include <lib-mime/mime.h>
static struct {
short id;
#endif
#include <lib-mime/mime.h>
+#include <lib-sys/unix.h>
#include <lib-ui/curses.h>
#include <lib-ui/enter.h>
#include <lib-ui/menu.h>
-#include "mutt.h"
#include "alias.h"
#include "handler.h"
#include "copy.h"
#include "alias.h"
+
#include "crypt.h"
+#include "smime.h"
struct smime_command_context {
const char *key; /* %k */
return m_strdup(key);
}
-
-
-
/*
This sets the '*ToUse' variables for an upcoming decryption, where
the reuquired key is different from SmimeDefaultKey.
*/
-
-void _smime_getkeys (char *mailbox)
+static void _smime_getkeys (char *mailbox)
{
char *k = NULL;
char buf[STRING];
if (fqdn)
rfc822_qualify (tmp, fqdn);
- address_list_uniq(&tmp);
+ address_list_uniq(tmp);
for (p = tmp; p; p = p->next) {
char buf[LONG_STRING];
return t ? t | PGPINLINE : 0;
}
+#include "mutt.h"
+
int mutt_is_application_smime (BODY * m)
{
char *t = NULL;
#include <lib-lib/lib-lib.h>
#include "mime-token.h"
+static const struct tok *
+mime_which_token_aux(const char *str, unsigned int len);
+
%}
struct tok { const char *name; int val; };
%%
#include <lib-mime/mime.h>
#include <lib-mime/rfc3676.h>
+#include <lib-sys/unix.h>
#include <lib-ui/curses.h>
#include <lib-ui/enter.h>
-#include "mutt.h"
#include "alias.h"
#include "keymap.h"
#include "copy.h"
}
#ifdef USE_NNTP
-char *nntp_get_header(const char *s)
+static char *nntp_get_header(const char *s)
{
return m_strdup(skipspaces(s));
}
}
/* the CC field can get cluttered, especially with lists */
- address_list_uniq(&env->to);
- address_list_uniq(&env->cc);
+ address_list_uniq(env->to);
+ address_list_uniq(env->cc);
env->cc = mutt_remove_xrefs (env->to, env->cc);
if (env->cc && !env->to) {
}
}
- address_list_uniq(&e->mail_followup_to);
+ address_list_uniq(e->mail_followup_to);
}
}