always use compressed mode.
[apps/madmutt.git] / smime.c
diff --git a/smime.c b/smime.c
index 0c9d435..e9f64f1 100644 (file)
--- a/smime.c
+++ b/smime.c
@@ -49,8 +49,6 @@
 # include <sys/resource.h>
 #endif
 
-#ifdef CRYPT_BACKEND_CLASSIC_SMIME
-
 #include "mutt_crypt.h"
 
 struct smime_command_context {
@@ -414,7 +412,7 @@ char *smime_ask_for_key (char *prompt, char *mailbox, short public)
         continue;
 
       /* Check if query matches this certificate */
-      if (!str_isstr (fields[0], qry) && !str_isstr (fields[2], qry))
+      if (!m_stristr(fields[0], qry) && !m_stristr(fields[2], qry))
         continue;
 
       Table[cur].hash = hash;
@@ -756,7 +754,7 @@ char *smime_findKeys (address_t * to, address_t * cc, address_t * bcc)
       abort ();
     }
 
-    *last = rfc822_cpy_adr (p);
+    *last = address_list_dup (p);
     while (*last)
       last = &((*last)->next);
   }
@@ -1880,12 +1878,8 @@ int smime_send_menu (HEADER * msg, int *redraw)
 {
   char *p;
 
-  if (!(WithCrypto & APPLICATION_SMIME))
-    return msg->security;
-
   switch (mutt_multi_choice
-          (_
-           ("S/MIME (e)ncrypt, (s)ign, encrypt (w)ith, sign (a)s, (b)oth, or (c)lear? "),
+          (_("S/MIME (e)ncrypt, (s)ign, encrypt (w)ith, sign (a)s, (b)oth, or (c)lear? "),
            _("eswabfc"))) {
   case 1:                      /* (e)ncrypt */
     msg->security |= ENCRYPT;
@@ -1906,10 +1900,10 @@ int smime_send_menu (HEADER * msg, int *redraw)
             switch (choice = mutt_multi_choice (_("1: DES, 2: Triple-DES "),
                                                 _("dt"))) {
               case 1:
-                str_replace (&SmimeCryptAlg, "des");
+                m_strreplace(&SmimeCryptAlg, "des");
                 break;
               case 2:
-                str_replace (&SmimeCryptAlg, "des3");
+                m_strreplace(&SmimeCryptAlg, "des3");
                 break;
             }
             break;
@@ -1918,13 +1912,13 @@ int smime_send_menu (HEADER * msg, int *redraw)
             switch (choice = mutt_multi_choice (_("1: RC2-40, 2: RC2-64, 3: RC2-128 "),
                                                 _("468"))) {
               case 1:
-                str_replace (&SmimeCryptAlg, "rc2-40");
+                m_strreplace(&SmimeCryptAlg, "rc2-40");
                 break;
               case 2:
-                str_replace (&SmimeCryptAlg, "rc2-64");
+                m_strreplace(&SmimeCryptAlg, "rc2-64");
                 break;
               case 3:
-                str_replace (&SmimeCryptAlg, "rc2-128");
+                m_strreplace(&SmimeCryptAlg, "rc2-128");
                 break;
             }
             break;
@@ -1933,13 +1927,13 @@ int smime_send_menu (HEADER * msg, int *redraw)
             switch (choice = mutt_multi_choice (_("1: AES128, 2: AES192, 3: AES256 "),
                                                 _("895"))) {
               case 1:
-                str_replace (&SmimeCryptAlg, "aes128");
+                m_strreplace(&SmimeCryptAlg, "aes128");
                 break;
               case 2:
-                str_replace (&SmimeCryptAlg, "aes192");
+                m_strreplace(&SmimeCryptAlg, "aes192");
                 break;
               case 3:
-                str_replace (&SmimeCryptAlg, "aes256");
+                m_strreplace(&SmimeCryptAlg, "aes256");
                 break;
             }
             break;
@@ -1969,7 +1963,7 @@ int smime_send_menu (HEADER * msg, int *redraw)
   case 4:                      /* sign (a)s */
 
     if ((p = smime_ask_for_key (_("Sign as: "), NULL, 0))) {
-      str_replace (&SmimeDefaultKey, p);
+      m_strreplace(&SmimeDefaultKey, p);
 
       msg->security |= SIGN;
 
@@ -2001,6 +1995,3 @@ int smime_send_menu (HEADER * msg, int *redraw)
 
   return (msg->security);
 }
-
-
-#endif /* CRYPT_BACKEND_CLASSIC_SMIME */