X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=pgp.c;h=c6e19e613a6d24f331620a97d3a35e1fb48b131c;hp=bdcba07eae506008d7d03ea876648fe486e491bb;hb=b8c71f93b0296f815a6538182343ba67e88c0012;hpb=2a06362a155582cd59ae2ef6f0df71694a7eede3 diff --git a/pgp.c b/pgp.c index bdcba07..c6e19e6 100644 --- a/pgp.c +++ b/pgp.c @@ -59,8 +59,6 @@ # include #endif -#ifdef CRYPT_BACKEND_CLASSIC_PGP - #include "mutt_crypt.h" #include "mutt_menu.h" @@ -1078,14 +1076,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; @@ -1106,7 +1104,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); } @@ -1146,8 +1144,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; } } @@ -1163,8 +1161,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; } } @@ -1181,10 +1179,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); } @@ -1491,9 +1489,6 @@ int pgp_send_menu (HEADER * msg, int *redraw) char prompt[LONG_STRING]; - if (!(WithCrypto & APPLICATION_PGP)) - return msg->security; - /* If autoinline and no crypto options set, then set inline. */ if (option (OPTPGPAUTOINLINE) && !((msg->security & APPLICATION_PGP) && (msg->security & (SIGN | ENCRYPT)))) @@ -1521,7 +1516,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; @@ -1563,6 +1558,3 @@ int pgp_send_menu (HEADER * msg, int *redraw) return (msg->security); } - - -#endif /* CRYPT_BACKEND_CLASSIC_PGP */