summaryrefslogtreecommitdiffstats
path: root/crypt-gpgme.c
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2021-06-13 14:12:30 -0700
committerKevin McCarthy <kevin@8t8.us>2021-06-13 14:12:30 -0700
commit3cf7a1492e8a709adee0e003594d2b58b2953403 (patch)
tree858eaecf9077ffc56001f58aec17f6c2105b2cde /crypt-gpgme.c
parent9629d5d6933c1a1d450827c4c3046916bcf7269b (diff)
Directly add full mailbox to GPG search hints.
The code previously called (crypt/pgp)_add_string_to_hints(), which performs a strtok() using " ,.:\"()<>\n" and discards parts of size 3 or less. This makes sense for personal fields, and random "stuff" entered in the getkeybystr() prompt. But it doesn't make a lot of sense for the mailbox. There's no advantage I can see in chopping off and discarding the domain name for getting more relevant results. Ordinarily, I wouldn't bother fixing this, but in ticket 354 someone is experimenting with alternative backends, and they would like the full email address listed in the hints.
Diffstat (limited to 'crypt-gpgme.c')
-rw-r--r--crypt-gpgme.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypt-gpgme.c b/crypt-gpgme.c
index cf1d466c..ceb576e7 100644
--- a/crypt-gpgme.c
+++ b/crypt-gpgme.c
@@ -4719,7 +4719,7 @@ static crypt_key_t *crypt_getkeybyaddr (ADDRESS * a, short abilities,
*forced_valid = 0;
if (a && a->mailbox)
- hints = crypt_add_string_to_hints (hints, a->mailbox);
+ hints = mutt_add_list (hints, a->mailbox);
if (a && a->personal)
hints = crypt_add_string_to_hints (hints, a->personal);