1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

gpg: Fix mailbox based search via AKL keyserver method.

* g10/keyserver.c (keyserver_import_name): Rename to ...
(keyserver_import_mbox): this.  And use mail search mode.
* g10/getkey.c (get_pubkey_byname): Change the two callers.
--

In contrast to a search via keyserver_import_ntds the older
keyserver_import_name used a full match of the provided name despite
that it is only called with an addr-spec (mbox).  Due to the mode the
pattern send to dirmngr was prefixed with a '=' and thus dirmngr used
an exact search;.  This did only work for provided user ids like
"foo@example.org" but not for "<foo@example.org>" or
"Foo <foo@xample.org>".  The old code dates back to 2010.

Signed-off-by: Werner Koch <wk@gnupg.org>
(cherry picked from commit 4fcfac6feb)
This commit is contained in:
Werner Koch 2021-04-26 15:32:51 +02:00
parent e7251be84c
commit 22fe23f46d
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
5 changed files with 11 additions and 13 deletions

View file

@ -1342,7 +1342,7 @@ get_pubkey_byname (ctrl_t ctrl, enum get_pubkey_modes mode,
}
else
{
rc = keyserver_import_name (ctrl, name, &fpr, &fpr_len,
rc = keyserver_import_mbox (ctrl, name, &fpr, &fpr_len,
opt.keyserver);
}
glo_ctrl.in_auto_key_retrieve--;
@ -1373,7 +1373,7 @@ get_pubkey_byname (ctrl_t ctrl, enum get_pubkey_modes mode,
}
else
{
rc = keyserver_import_name (ctrl, name,
rc = keyserver_import_mbox (ctrl, name,
&fpr, &fpr_len, keyserver);
}
glo_ctrl.in_auto_key_retrieve--;