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: T1816
- Signed-off-by: Werner Koch <wk@gnupg.org>