X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=commands.c;h=cf56023a22a374fbdfbbfb0e373942b827c37ebf;hp=8d31af60092bfc22586d03c783c35b78a1456368;hb=73359dc55ff8f4da32149f7270f7ceaccd658256;hpb=0840ecb90bb99da0d6b0c028ace977dd1932e6e1 diff --git a/commands.c b/commands.c index 8d31af6..cf56023 100644 --- a/commands.c +++ b/commands.c @@ -28,7 +28,7 @@ #include "sort.h" #include "copy.h" #include "pager.h" -#include +#include "crypt.h" #include "mutt_idna.h" #include #include @@ -56,7 +56,7 @@ int mutt_display_message (HEADER * cur) mutt_parse_mime_message (Context, cur); mutt_message_hook (Context, cur, M_MESSAGEHOOK); - fpout = m_tempfile(tempfile, sizeof(tempfile), NONULL(Tempdir), NULL); + fpout = m_tempfile(tempfile, sizeof(tempfile), NONULL(MCore.tmpdir), NULL); if (!fpout) { mutt_error _("Could not create temporary file!"); return 0; @@ -91,11 +91,6 @@ int mutt_display_message (HEADER * cur) /* see if crytpo is needed for this message. if so, we should exit curses */ if (cur->security) { if (cur->security & ENCRYPT) { - if (cur->security & APPLICATION_SMIME) - crypt_smime_getkeys (cur->env); - if (!crypt_valid_passphrase (cur->security)) - return 0; - cmflags |= M_CM_VERIFY; } else if (cur->security & SIGN) { @@ -108,15 +103,7 @@ int mutt_display_message (HEADER * cur) } if (cmflags & M_CM_VERIFY || cur->security & ENCRYPT) { - if (cur->security & APPLICATION_PGP) { - if (cur->env->from) - crypt_pgp_invoke_getkeys (cur->env->from); - - crypt_invoke_message (APPLICATION_PGP); - } - - if (cur->security & APPLICATION_SMIME) - crypt_invoke_message (APPLICATION_SMIME); + crypt_invoke_message(cur->security); } res = _mutt_copy_message (fpout, msg->fp, cur, cur->content, cmflags, @@ -301,8 +288,6 @@ static void pipe_msg (HEADER * h, FILE * fp, int decode, int print) pipe_set_flags (decode, print, &cmflags, &chflags); if (decode && h->security & ENCRYPT) { - if (!crypt_valid_passphrase (h->security)) - return; endwin (); } @@ -335,8 +320,6 @@ static int _mutt_pipe_message(HEADER * h, char *cmd, int decode, int print, if (decode) { mutt_parse_mime_message (Context, h); - if (h->security & ENCRYPT && !crypt_valid_passphrase (h->security)) - return 1; } mutt_endwin (NULL); @@ -358,10 +341,6 @@ static int _mutt_pipe_message(HEADER * h, char *cmd, int decode, int print, mutt_message_hook (Context, Context->hdrs[Context->v2r[i]], M_MESSAGEHOOK); mutt_parse_mime_message (Context, Context->hdrs[Context->v2r[i]]); - if (Context->hdrs[Context->v2r[i]]->security & ENCRYPT && - !crypt_valid_passphrase (Context->hdrs[Context->v2r[i]]-> - security)) - return 1; } } @@ -520,7 +499,7 @@ void mutt_shell_escape (void) buf[0] = 0; if (mutt_get_field (_("Shell command: "), buf, sizeof (buf), M_CMD) == 0) { if (!buf[0]) - mlua_value(buf, sizeof(buf), "madmutt", "shell"); + m_strcpy(buf, sizeof(buf), MCore.shell); if (buf[0]) { CLEARLINE (LINES - 1); mutt_endwin (NULL); @@ -713,10 +692,6 @@ int mutt_save_message (HEADER * h, int delete, if (mutt_save_confirm (buf, &st) != 0) return -1; - if (need_passphrase && (decode || decrypt) - && !crypt_valid_passphrase (app)) - return -1; - mutt_message (_("Copying to %s..."), buf); if (Context->magic == M_IMAP && !(decode || decrypt) && mx_get_magic (buf) == M_IMAP) {