mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
gpg: Change keydb_search to not return legacy keys.
* g10/keyring.c (keyring_search): Take new argument, ignore_legacy. If set, skip any legacy keys. Update callers. * g10/keydb.c (keydb_search): Skip any legacy keys. (keydb_search_first): Don't skip legacy keys. Treat them as an error. (keydb_search_next): Likewise. (keydb_search_fpr): Likewise. * g10/export.c (do_export_stream): Likewise. * g10/getkey.c (lookup): Likewise. (have_secret_key_with_kid): Likewise. * g10/keylist.c (list_all): Likewise. (keyring_rebuild_cache): Likewise. * g10/keyserver.c (keyidlist): Likewise. * g10/trustdb.c (validate_key_list): Likewise. -- Signed-off-by: Neal H. Walfield <neal@g10code.com>
This commit is contained in:
parent
848726f5c0
commit
58e4a492e2
8 changed files with 34 additions and 94 deletions
|
@ -296,7 +296,8 @@ unsigned long keydb_get_skipped_counter (KEYDB_HANDLE hd);
|
|||
(Currently, this function always returns 0 if HD is valid.) */
|
||||
gpg_error_t keydb_search_reset (KEYDB_HANDLE hd);
|
||||
|
||||
/* Search the database for keys matching the search description.
|
||||
/* Search the database for keys matching the search description. If
|
||||
the DB contains any legacy keys, these are silently ignored.
|
||||
|
||||
DESC is an array of search terms with NDESC entries. The search
|
||||
terms are or'd together. That is, the next entry in the DB that
|
||||
|
@ -338,7 +339,7 @@ gpg_error_t keydb_search_next (KEYDB_HANDLE hd);
|
|||
gpg_error_t keydb_search_kid (KEYDB_HANDLE hd, u32 *kid);
|
||||
|
||||
/* This is a convenience function for searching for keys with a long
|
||||
(20 byte) fingerprint. This function ignores legacy keys.
|
||||
(20 byte) fingerprint.
|
||||
|
||||
Note: this function resumes searching where the last search left
|
||||
off. If you want to search the whole database, then you need to
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue