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

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>
This commit is contained in:
Werner Koch 2019-03-14 14:55:06 +01:00
parent caf4b3fc16
commit bdda31a26b
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
19 changed files with 56 additions and 237 deletions

View file

@ -853,8 +853,7 @@ command_send (const char *fingerprint, const char *userid)
time_t thistime;
if (classify_user_id (fingerprint, &desc, 1)
|| !(desc.mode == KEYDB_SEARCH_MODE_FPR
|| desc.mode == KEYDB_SEARCH_MODE_FPR20))
|| desc.mode != KEYDB_SEARCH_MODE_FPR)
{
log_error (_("\"%s\" is not a fingerprint\n"), fingerprint);
err = gpg_error (GPG_ERR_INV_NAME);

View file

@ -946,8 +946,7 @@ wks_cmd_install_key (const char *fname, const char *userid)
}
if (!classify_user_id (fname, &desc, 1)
&& (desc.mode == KEYDB_SEARCH_MODE_FPR
|| desc.mode == KEYDB_SEARCH_MODE_FPR20))
&& desc.mode == KEYDB_SEARCH_MODE_FPR)
{
/* FNAME looks like a fingerprint. Get the key from the
* standard keyring. */