mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
g10: Don't skip legacy keys if the search mode is KEYDB_SEARCH_MODE_NEXT
* g10/getkey.c (lookup): Also don't skip legacy keys if the search mode is KEYDB_SEARCH_MODE_NEXT. -- Signed-off-by: Neal H. Walfield <neal@g10code.com>. We currently don't skip keys if the search mode is KEYDB_SEARCH_MODE_FIRST. Since we change KEYDB_SEARCH_MODE_FIRST to KEYDB_SEARCH_MODE_NEXT (to avoid a reset), it only makes sense to have the same semantics for KEYDB_SEARCH_MODE_NEXT.
This commit is contained in:
parent
efbaa8f891
commit
50affffe93
@ -2437,7 +2437,8 @@ lookup (getkey_ctx_t ctx, kbnode_t *ret_keyblock, kbnode_t *ret_found_key,
|
||||
then it would be harder to report the number of skipped
|
||||
legacy keys during import. */
|
||||
if (gpg_err_code (rc) == GPG_ERR_LEGACY_KEY
|
||||
&& !(ctx->nitems && ctx->items->mode == KEYDB_SEARCH_MODE_FIRST)
|
||||
&& !(ctx->nitems && (ctx->items->mode == KEYDB_SEARCH_MODE_FIRST
|
||||
|| ctx->items->mode == KEYDB_SEARCH_MODE_NEXT))
|
||||
&& !search_modes_are_fingerprint (ctx))
|
||||
continue;
|
||||
if (rc)
|
||||
|
Loading…
x
Reference in New Issue
Block a user