1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

gpg: Fix --recv-key in case of a given fingerprint.

* g10/keyserver.c (keyserver_retrieval_screener): Compare against
actual length.
--

This was a long standing and annoying regression due to changes
for v5 keys.  Really simple to fix :-).

Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2019-09-30 18:03:31 +02:00
parent ec81c437e7
commit a605dbb430
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

@ -1054,7 +1054,8 @@ keyserver_retrieval_screener (kbnode_t keyblock, void *opaque)
{
if (desc[n].mode == KEYDB_SEARCH_MODE_FPR)
{
if (fpr_len == desc[n].fprlen && !memcmp (fpr, desc[n].u.fpr, 32))
if (fpr_len == desc[n].fprlen
&& !memcmp (fpr, desc[n].u.fpr, desc[n].fprlen))
return 0;
}
else if (desc[n].mode == KEYDB_SEARCH_MODE_LONG_KID)