diff options
author | Werner Koch <wk@gnupg.org> | 2019-09-30 18:03:31 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2019-09-30 18:03:31 +0200 |
commit | a605dbb430b1f73ef974ad54f74679dfc0eefb18 (patch) | |
tree | 93ddb9c02f40a8ec280ff93b6ceee7aebbe35549 | |
parent | gpg: Fix expand GPG groups when resolving a key (diff) | |
download | gnupg2-a605dbb430b1f73ef974ad54f74679dfc0eefb18.tar.xz gnupg2-a605dbb430b1f73ef974ad54f74679dfc0eefb18.zip |
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>
-rw-r--r-- | g10/keyserver.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/g10/keyserver.c b/g10/keyserver.c index c2e304f09..4d4a3ded8 100644 --- a/g10/keyserver.c +++ b/g10/keyserver.c @@ -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) |