diff options
author | Neal H. Walfield <[email protected]> | 2015-11-17 13:38:03 +0000 |
---|---|---|
committer | Neal H. Walfield <[email protected]> | 2015-11-17 13:53:05 +0000 |
commit | 58e4a492e2c8e908d16135486ed601f602f1e38d (patch) | |
tree | e45496bf0d8c6a2e890a3de6ae42772b951d58f3 /g10/trustdb.c | |
parent | gpg: Correctly handle an error. (diff) | |
download | gnupg-58e4a492e2c8e908d16135486ed601f602f1e38d.tar.gz gnupg-58e4a492e2c8e908d16135486ed601f602f1e38d.zip |
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 <[email protected]>
Diffstat (limited to '')
-rw-r--r-- | g10/trustdb.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/g10/trustdb.c b/g10/trustdb.c index 943357c1d..386796c68 100644 --- a/g10/trustdb.c +++ b/g10/trustdb.c @@ -1732,9 +1732,6 @@ validate_key_list (KEYDB_HANDLE hd, KeyHashTable full_trust, { PKT_public_key *pk; - if (gpg_err_code (rc) == GPG_ERR_LEGACY_KEY) - continue; - rc = keydb_get_keyblock (hd, &keyblock); if (rc) { @@ -1790,8 +1787,7 @@ validate_key_list (KEYDB_HANDLE hd, KeyHashTable full_trust, release_kbnode (keyblock); keyblock = NULL; } - while (!(rc = keydb_search (hd, &desc, 1, NULL)) - || gpg_err_code (rc) == GPG_ERR_LEGACY_KEY); + while (!(rc = keydb_search (hd, &desc, 1, NULL))); if (rc && gpg_err_code (rc) != GPG_ERR_NOT_FOUND) { |