mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
gpg: Improve skipping of PGP-2 keys.
* g10/keydb.c (keydb_search_first, keydb_search_next): Skip legacy keys. * g10/keyring.c (keyring_get_keyblock): Handle GPG_ERR_LEGACY_KEY. (prepare_search): Ditto. (keyring_rebuild_cache): Skip legacy keys. * g10/keyserver.c (keyidlist): Ditto. * g10/trustdb.c (validate_key_list): Ditto. -- This is not the most elegant way to handle it but it reduces the chance for unwanted side effects. GnuPG-bug-id: 1816 Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
6f3d11d883
commit
09e8f35d38
5 changed files with 61 additions and 11 deletions
|
@ -1604,6 +1604,9 @@ 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)
|
||||
{
|
||||
|
@ -1660,7 +1663,8 @@ validate_key_list (KEYDB_HANDLE hd, KeyHashTable full_trust,
|
|||
release_kbnode (keyblock);
|
||||
keyblock = NULL;
|
||||
}
|
||||
while (!(rc = keydb_search (hd, &desc, 1, NULL)));
|
||||
while (!(rc = keydb_search (hd, &desc, 1, NULL))
|
||||
|| gpg_err_code (rc) == GPG_ERR_LEGACY_KEY);
|
||||
|
||||
if (rc && gpg_err_code (rc) != GPG_ERR_NOT_FOUND)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue