mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
gpg: Choose key from inserted card over a non-inserted card
* g10/call-agent.c (agent_probe_secret_key): Do not return an error but 0. * g10/getkey.c (finish_lookup): Improve the selection of secret keys. -- GnuPG-bug-id: 6831
This commit is contained in:
parent
591a53d716
commit
4c04143d81
2 changed files with 17 additions and 3 deletions
|
@ -3772,6 +3772,13 @@ finish_lookup (kbnode_t keyblock, unsigned int req_usage, int want_exact,
|
|||
continue;
|
||||
}
|
||||
|
||||
if (secret_key_avail < last_secret_key_avail)
|
||||
{
|
||||
if (DBG_LOOKUP)
|
||||
log_debug ("\tskipping secret key with lower avail\n");
|
||||
continue;
|
||||
}
|
||||
|
||||
if (secret_key_avail > last_secret_key_avail)
|
||||
{
|
||||
/* Use this key. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue