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
|
@ -466,6 +466,8 @@ list_all (int secret, int mark_secret)
|
|||
rc = keydb_get_keyblock (hd, &keyblock);
|
||||
if (rc)
|
||||
{
|
||||
if (gpg_err_code (rc) == GPG_ERR_LEGACY_KEY)
|
||||
continue; /* Skip legacy keys. */
|
||||
log_error ("keydb_get_keyblock failed: %s\n", gpg_strerror (rc));
|
||||
goto leave;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue