mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
g10: Properly ignore legacy keys in the keyring cache.
* g10/keyring.c (keyring_rebuild_cache): Properly ignore legacy keys in the keyring cache. * tests/migrations/Makefile.am (TESTS): Add new test. * tests/migrations/common.scm (GPG-no-batch): New variable. (run-test): New function. * tests/migrations/issue2276.scm: New file. * tests/migrations/issue2276.tar.asc: Likewise. GnuPG-bug-id: 2276 Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
parent
45bb9a2a46
commit
d9839c9d30
5 changed files with 376 additions and 6 deletions
|
@ -1455,7 +1455,7 @@ keyring_rebuild_cache (void *token,int noisy)
|
|||
|
||||
for (;;)
|
||||
{
|
||||
rc = keyring_search (hd, &desc, 1, NULL, 0);
|
||||
rc = keyring_search (hd, &desc, 1, NULL, 1 /* ignore_legacy */);
|
||||
if (rc)
|
||||
break; /* ready. */
|
||||
|
||||
|
@ -1492,9 +1492,6 @@ keyring_rebuild_cache (void *token,int noisy)
|
|||
goto leave;
|
||||
}
|
||||
|
||||
if (gpg_err_code (rc) == GPG_ERR_LEGACY_KEY)
|
||||
continue;
|
||||
|
||||
release_kbnode (keyblock);
|
||||
rc = keyring_get_keyblock (hd, &keyblock);
|
||||
if (rc)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue