X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=crypt-gpgme.c;h=9728bcce89e9fec7eadb0442fce0ddf10ab3dba9;hp=2a370b0e190f19bdca69c6f3fdc046508fcd2fd5;hb=ae0ce4dfcafa0c3820f107c5bfa8bd06e5272b57;hpb=9274cbe8e6410ddb95ddc667faa678a29da85420 diff --git a/crypt-gpgme.c b/crypt-gpgme.c index 2a370b0..9728bcc 100644 --- a/crypt-gpgme.c +++ b/crypt-gpgme.c @@ -22,6 +22,7 @@ #include #include #include +#include #include "mutt.h" #include "mutt_crypt.h" @@ -1006,7 +1007,7 @@ static int show_sig_summary (unsigned long sum, state_attach_puts (": ", s); if (t0) state_attach_puts (t0, s); - if (t1 && !(t0 && !str_cmp (t0, t1))) { + if (t1 && !(t0 && !m_strcmp(t0, t1))) { if (t0) state_attach_puts (",", s); state_attach_puts (t1, s); @@ -1660,9 +1661,9 @@ static int pgp_check_traditional_one_body (FILE * fp, BODY * b, while (fgets (buf, sizeof (buf), tfp)) { if (!str_ncmp ("-----BEGIN PGP ", buf, 15)) { - if (!str_cmp ("MESSAGE-----\n", buf + 15)) + if (!m_strcmp("MESSAGE-----\n", buf + 15)) enc = 1; - else if (!str_cmp ("SIGNED MESSAGE-----\n", buf + 15)) + else if (!m_strcmp("SIGNED MESSAGE-----\n", buf + 15)) sgn = 1; } } @@ -1741,7 +1742,7 @@ static void copy_clearsigned (gpgme_data_t data, STATE * s, char *charset) continue; } - if (!str_cmp (buf, "-----BEGIN PGP SIGNATURE-----\n")) + if (!m_strcmp(buf, "-----BEGIN PGP SIGNATURE-----\n")) break; if (armor_header) { @@ -1806,14 +1807,14 @@ int pgp_gpgme_application_handler (BODY * m, STATE * s) clearsign = 0; start_pos = last_pos; - if (!str_cmp ("MESSAGE-----\n", buf + 15)) + if (!m_strcmp("MESSAGE-----\n", buf + 15)) needpass = 1; - else if (!str_cmp ("SIGNED MESSAGE-----\n", buf + 15)) { + else if (!m_strcmp("SIGNED MESSAGE-----\n", buf + 15)) { clearsign = 1; needpass = 0; } else if (!option (OPTDONTHANDLEPGPKEYS) && - !str_cmp ("PUBLIC KEY BLOCK-----\n", buf + 15)) { + !m_strcmp("PUBLIC KEY BLOCK-----\n", buf + 15)) { needpass = 0; pgp_keyblock = 1; } @@ -1837,10 +1838,10 @@ int pgp_gpgme_application_handler (BODY * m, STATE * s) gpgme_data_write (armored_data, buf, m_strlen(buf)); - if ((needpass && !str_cmp ("-----END PGP MESSAGE-----\n", buf)) + if ((needpass && !m_strcmp("-----END PGP MESSAGE-----\n", buf)) || (!needpass - && (!str_cmp ("-----END PGP SIGNATURE-----\n", buf) - || !str_cmp ("-----END PGP PUBLIC KEY BLOCK-----\n", + && (!m_strcmp("-----END PGP SIGNATURE-----\n", buf) + || !m_strcmp("-----END PGP PUBLIC KEY BLOCK-----\n", buf)))) break; } @@ -2482,7 +2483,7 @@ static int print_dn_part (FILE * fp, struct dn_array_s *dn, const char *key) int any = 0; for (; dn->key; dn++) { - if (!str_cmp (dn->key, key)) { + if (!m_strcmp(dn->key, key)) { if (any) fputs (" + ", fp); print_utf8 (fp, dn->value, m_strlen(dn->value)); @@ -2508,7 +2509,7 @@ static void print_dn_parts (FILE * fp, struct dn_array_s *dn) /* now print the rest without any specific ordering */ for (; dn->key; dn++) { for (i = 0; stdpart[i]; i++) { - if (!str_cmp (dn->key, stdpart[i])) + if (!m_strcmp(dn->key, stdpart[i])) break; } if (!stdpart[i]) { @@ -2981,7 +2982,7 @@ static void verify_key (crypt_key_t * key) k = key->kobj; gpgme_key_ref (k); - while ((s = k->chain_id) && k->subkeys && str_cmp (s, k->subkeys->fpr)) { + while ((s = k->chain_id) && k->subkeys && m_strcmp(s, k->subkeys->fpr)) { putc ('\n', fp); err = gpgme_op_keylist_start (listctx, s, 0); gpgme_key_release (k); @@ -3221,7 +3222,7 @@ static LIST *crypt_add_string_to_hints (LIST * hints, const char *str) for (t = strtok (scratch, " ,.:\"()<>\n"); t; t = strtok (NULL, " ,.:\"()<>\n")) { if (m_strlen(t) > 3) - hints = mutt_add_list (hints, t); + hints = mutt_add_list(hints, t); } p_delete(&scratch);