*/
-/* Convert LIST into a pattern string suitable to be passed to GPGME.
+/* Convert string_list_t into a pattern string suitable to be passed to GPGME.
We need to convert spaces in an item into a '+' and '%' into
"%25". */
-static char *list_to_pattern (LIST * list)
+static char *list_to_pattern (string_list_t * list)
{
- LIST *l;
+ string_list_t *l;
char *pattern, *p;
const char *s;
size_t n;
/* Return a list of keys which are candidates for the selection.
Select by looking at the HINTS list. */
-static crypt_key_t *get_candidates (LIST * hints, unsigned int app,
+static crypt_key_t *get_candidates (string_list_t * hints, unsigned int app,
int secret)
{
crypt_key_t *db, *k, **kend;
depending on the protocol. For gpg we don' t need percent
escaped pappert but simple strings passed in an array to the
keylist_ext_start function. */
- LIST *l;
+ string_list_t *l;
size_t n;
char **patarr;
/* Add the string STR to the list HINTS. This list is later used to
match addresses. */
-static LIST *crypt_add_string_to_hints (LIST * hints, const char *str)
+static string_list_t *crypt_add_string_to_hints (string_list_t * hints, const char *str)
{
char *scratch;
char *t;
unsigned int app, int *forced_valid)
{
address_t *r, *p;
- LIST *hints = NULL;
+ string_list_t *hints = NULL;
int weak = 0;
int invalid = 0;
mutt_message (_("Looking for keys matching \"%s\"..."), a->mailbox);
keys = get_candidates (hints, app, (abilities & KEYFLAG_CANSIGN));
- mutt_free_list (&hints);
+ string_list_wipe(&hints);
if (!keys)
return NULL;
|| !(validity & CRYPT_KV_ADDR)))
this_key_has_weak = 1;
}
- address_delete (&r);
+ address_list_wipe(&r);
if (match) {
crypt_key_t *tmp;
static crypt_key_t *crypt_getkeybystr (char *p, short abilities,
unsigned int app, int *forced_valid)
{
- LIST *hints = NULL;
+ string_list_t *hints = NULL;
crypt_key_t *keys;
crypt_key_t *matches = NULL;
crypt_key_t **matches_endp = &matches;
hints = crypt_add_string_to_hints (hints, p);
keys = get_candidates (hints, app, (abilities & KEYFLAG_CANSIGN));
- mutt_free_list (&hints);
+ string_list_wipe(&hints);
if (!keys)
return NULL;
}
else if (r == -1) {
p_delete(&keylist);
- address_delete (&tmp);
- address_delete (&addr);
+ address_list_wipe(&tmp);
+ address_list_wipe(&addr);
return NULL;
}
}
#endif
&forced_valid)) == NULL) {
p_delete(&keylist);
- address_delete (&tmp);
- address_delete (&addr);
+ address_list_wipe(&tmp);
+ address_list_wipe(&addr);
return NULL;
}
}
keylist_used = m_strlen(keylist);
crypt_free_key (&key);
- address_delete (&addr);
+ address_list_wipe(&addr);
}
- address_delete (&tmp);
+ address_list_wipe(&tmp);
return (keylist);
}