summaryrefslogtreecommitdiffstats
path: root/kbx
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2019-03-14 14:55:06 +0100
committerWerner Koch <wk@gnupg.org>2019-03-14 14:55:06 +0100
commitbdda31a26bc69b6ee72e964510db113645de76ef (patch)
treee4e9f9b71a4b3a6cf64821f33f851bd2fcc559a4 /kbx
parentgpg: Make rfc4880bis the default. (diff)
downloadgnupg2-bdda31a26bc69b6ee72e964510db113645de76ef.tar.xz
gnupg2-bdda31a26bc69b6ee72e964510db113645de76ef.zip
kbx: Unify the fingerprint search modes.
* kbx/keybox-search-desc.h (KEYDB_SEARCH_MODE_FPR16) (KEYDB_SEARCH_MODE_FPR20, KEYDB_SEARCH_MODE_FPR32): Remove. Switch all users to KEYDB_SEARCH_MODE_FPR along with the fprlen value. -- These search modes were added over time and there has until recently be no incentive to remove the cruft. With the change for v5 keys I finally went over all places and allowed the generic fingerprint mode along with a given length of the fingerprint at all places. Consequently the other modes can now be removed. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'kbx')
-rw-r--r--kbx/keybox-search-desc.h3
-rw-r--r--kbx/keybox-search.c12
2 files changed, 0 insertions, 15 deletions
diff --git a/kbx/keybox-search-desc.h b/kbx/keybox-search-desc.h
index cde1cf56f..7286d2ae3 100644
--- a/kbx/keybox-search-desc.h
+++ b/kbx/keybox-search-desc.h
@@ -36,9 +36,6 @@ typedef enum {
KEYDB_SEARCH_MODE_WORDS,
KEYDB_SEARCH_MODE_SHORT_KID,
KEYDB_SEARCH_MODE_LONG_KID,
- KEYDB_SEARCH_MODE_FPR16,
- KEYDB_SEARCH_MODE_FPR20,
- KEYDB_SEARCH_MODE_FPR32,
KEYDB_SEARCH_MODE_FPR, /* (Length of fpr in .fprlen) */
KEYDB_SEARCH_MODE_ISSUER,
KEYDB_SEARCH_MODE_ISSUER_SN,
diff --git a/kbx/keybox-search.c b/kbx/keybox-search.c
index db98648f4..101e1b5ea 100644
--- a/kbx/keybox-search.c
+++ b/kbx/keybox-search.c
@@ -1083,18 +1083,6 @@ keybox_search (KEYBOX_HANDLE hd, KEYBOX_SEARCH_DESC *desc, size_t ndesc,
goto found;
break;
- case KEYDB_SEARCH_MODE_FPR20:
- pk_no = has_fingerprint (blob, desc[n].u.fpr, 20);
- if (pk_no)
- goto found;
- break;
-
- case KEYDB_SEARCH_MODE_FPR32:
- pk_no = has_fingerprint (blob, desc[n].u.fpr, 32);
- if (pk_no)
- goto found;
- break;
-
case KEYDB_SEARCH_MODE_KEYGRIP:
if (has_keygrip (blob, desc[n].u.grip))
goto found;