diff options
author | Werner Koch <[email protected]> | 2019-03-14 13:55:06 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2019-03-14 13:55:06 +0000 |
commit | bdda31a26bc69b6ee72e964510db113645de76ef (patch) | |
tree | e4e9f9b71a4b3a6cf64821f33f851bd2fcc559a4 /g10/keyring.c | |
parent | gpg: Make rfc4880bis the default. (diff) | |
download | gnupg-bdda31a26bc69b6ee72e964510db113645de76ef.tar.gz gnupg-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 <[email protected]>
Diffstat (limited to 'g10/keyring.c')
-rw-r--r-- | g10/keyring.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/g10/keyring.c b/g10/keyring.c index bc1d06c09..21791a6ac 100644 --- a/g10/keyring.c +++ b/g10/keyring.c @@ -995,9 +995,6 @@ keyring_search (KEYRING_HANDLE hd, KEYDB_SEARCH_DESC *desc, case KEYDB_SEARCH_MODE_LONG_KID: need_keyid = 1; break; - case KEYDB_SEARCH_MODE_FPR16: - case KEYDB_SEARCH_MODE_FPR20: - case KEYDB_SEARCH_MODE_FPR32: case KEYDB_SEARCH_MODE_FPR: need_fpr = 1; break; @@ -1182,18 +1179,6 @@ keyring_search (KEYRING_HANDLE hd, KEYDB_SEARCH_DESC *desc, && desc[n].u.kid[1] == aki[1]) goto found; break; - case KEYDB_SEARCH_MODE_FPR16: - if (pk && !memcmp (desc[n].u.fpr, afp, 16)) - goto found; - break; - case KEYDB_SEARCH_MODE_FPR20: - if (pk && !memcmp (desc[n].u.fpr, afp, 20)) - goto found; - break; - case KEYDB_SEARCH_MODE_FPR32: - if (pk && !memcmp (desc[n].u.fpr, afp, 32)) - goto found; - break; case KEYDB_SEARCH_MODE_FPR: if (pk && desc[n].fprlen >= 16 && desc[n].fprlen <= 32 && !memcmp (desc[n].u.fpr, afp, desc[n].fprlen)) |