various rewrites and cleanups.
[apps/madmutt.git] / commands.c
index f5b4d43..cf56023 100644 (file)
@@ -28,7 +28,7 @@
 #include "sort.h"
 #include "copy.h"
 #include "pager.h"
-#include <lib-crypt/crypt.h>
+#include "crypt.h"
 #include "mutt_idna.h"
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -91,8 +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);
         cmflags |= M_CM_VERIFY;
       }
       else if (cur->security & SIGN) {
@@ -105,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,