X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=pgp.c;h=a17b481d1c55ae8029f25c8e4ce1afadcb2016de;hp=bdb78d67fb642bc4aff02ea22576a266fb2a9ade;hb=a8aba140a61d5b86093cea46afcb613092d4978d;hpb=c8bf978fc5c4f6c793620a515fa2456a3fa9eb13 diff --git a/pgp.c b/pgp.c index bdb78d6..a17b481 100644 --- a/pgp.c +++ b/pgp.c @@ -27,12 +27,13 @@ #include #include +#include + #include "mutt.h" #include "enter.h" #include "handler.h" #include "mutt_curses.h" #include "pgp.h" -#include "mime.h" #include "copy.h" #include "attach.h" @@ -1077,14 +1078,14 @@ static short is_numerical_keyid (const char *s) /* This routine attempts to find the keyids of the recipients of a message. * It returns NULL if any of the keys can not be found. */ -char *pgp_findKeys (ADDRESS * to, ADDRESS * cc, ADDRESS * bcc) +char *pgp_findKeys (address_t * to, address_t * cc, address_t * bcc) { char *keyID, *keylist = NULL, *t; size_t keylist_size = 0; size_t keylist_used = 0; - ADDRESS *tmp = NULL, *addr = NULL; - ADDRESS **last = &tmp; - ADDRESS *p, *q; + address_t *tmp = NULL, *addr = NULL; + address_t **last = &tmp; + address_t *p, *q; int i; pgp_key_t k_info = NULL, key = NULL; @@ -1105,7 +1106,7 @@ char *pgp_findKeys (ADDRESS * to, ADDRESS * cc, ADDRESS * bcc) abort (); } - *last = rfc822_cpy_adr (p); + *last = address_list_dup (p); while (*last) last = &((*last)->next); } @@ -1145,8 +1146,8 @@ char *pgp_findKeys (ADDRESS * to, ADDRESS * cc, ADDRESS * bcc) } else if (r == -1) { p_delete(&keylist); - rfc822_free_address (&tmp); - rfc822_free_address (&addr); + address_delete (&tmp); + address_delete (&addr); return NULL; } } @@ -1162,8 +1163,8 @@ char *pgp_findKeys (ADDRESS * to, ADDRESS * cc, ADDRESS * bcc) if ((key = pgp_ask_for_key (buf, q->mailbox, KEYFLAG_CANENCRYPT, PGP_PUBRING)) == NULL) { p_delete(&keylist); - rfc822_free_address (&tmp); - rfc822_free_address (&addr); + address_delete (&tmp); + address_delete (&addr); return NULL; } } @@ -1180,10 +1181,10 @@ char *pgp_findKeys (ADDRESS * to, ADDRESS * cc, ADDRESS * bcc) keylist_used = m_strlen(keylist); pgp_free_key (&key); - rfc822_free_address (&addr); + address_delete (&addr); } - rfc822_free_address (&tmp); + address_delete (&tmp); return (keylist); } @@ -1520,7 +1521,7 @@ int pgp_send_menu (HEADER * msg, int *redraw) pgp_ask_for_key (_("Sign as: "), NULL, KEYFLAG_CANSIGN, PGP_PUBRING))) { snprintf (input_signas, sizeof (input_signas), "0x%s", pgp_keyid (p)); - str_replace (&PgpSignAs, input_signas); + m_strreplace(&PgpSignAs, input_signas); pgp_free_key (&p); msg->security |= SIGN;