mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
Revert "gpg: The first key should be in candidates."
This reverts commit 66eb953f43800a91c4280ae8fd49f6dc8cf74578. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
652ca4b2bf
commit
2906636b92
@ -1442,8 +1442,6 @@ get_best_pubkey_byname (ctrl_t ctrl, enum get_pubkey_modes mode,
|
|||||||
int is_mbox = is_valid_mailbox (name);
|
int is_mbox = is_valid_mailbox (name);
|
||||||
int wkd_tried = 0;
|
int wkd_tried = 0;
|
||||||
|
|
||||||
log_assert (ret_keyblock != NULL);
|
|
||||||
|
|
||||||
if (retctx)
|
if (retctx)
|
||||||
*retctx = NULL;
|
*retctx = NULL;
|
||||||
|
|
||||||
@ -1506,10 +1504,7 @@ get_best_pubkey_byname (ctrl_t ctrl, enum get_pubkey_modes mode,
|
|||||||
struct pubkey_cmp_cookie new = { 0 };
|
struct pubkey_cmp_cookie new = { 0 };
|
||||||
kbnode_t new_keyblock;
|
kbnode_t new_keyblock;
|
||||||
|
|
||||||
copy_public_key (&new.key, (*ret_keyblock)->pkt->pkt.public_key);
|
while (getkey_next (ctrl, ctx, &new.key, &new_keyblock) == 0)
|
||||||
new_keyblock = clone_kbnode (*ret_keyblock);
|
|
||||||
|
|
||||||
do
|
|
||||||
{
|
{
|
||||||
int diff = pubkey_cmp (ctrl, name, &best, &new, new_keyblock);
|
int diff = pubkey_cmp (ctrl, name, &best, &new, new_keyblock);
|
||||||
release_kbnode (new_keyblock);
|
release_kbnode (new_keyblock);
|
||||||
@ -1534,8 +1529,6 @@ get_best_pubkey_byname (ctrl_t ctrl, enum get_pubkey_modes mode,
|
|||||||
}
|
}
|
||||||
new.uid = NULL;
|
new.uid = NULL;
|
||||||
}
|
}
|
||||||
while (getkey_next (ctrl, ctx, &new.key, &new_keyblock) == 0);
|
|
||||||
|
|
||||||
getkey_end (ctrl, ctx);
|
getkey_end (ctrl, ctx);
|
||||||
ctx = NULL;
|
ctx = NULL;
|
||||||
free_user_id (best.uid);
|
free_user_id (best.uid);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user