1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-21 10:09:57 +01:00

gpg: Fix agent_probe_any_secret_key.

* g10/call-agent.c (agent_probe_any_secret_key): No second keygrip
is not an error.

--

GnuPG-bug-id: 7195
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2024-07-10 15:13:06 +09:00
parent d6017e4b1e
commit 1e6b96577f
No known key found for this signature in database
GPG Key ID: 640114AF89DE6054

View File

@ -2434,9 +2434,14 @@ agent_probe_any_secret_key (ctrl_t ctrl, kbnode_t keyblock)
nkeys++;
err = keygrip_from_pk (node->pkt->pkt.public_key, grip2, 1);
if (err && gpg_err_code (err) != GPG_ERR_FALSE)
return err;
if (!err) /* Add the second keygrip from dual algos. */
if (err)
{
if (gpg_err_code (err) == GPG_ERR_FALSE) /* No second keygrip. */
err = 0;
else
return err;
}
else /* Add the second keygrip from dual algos. */
{
*p++ = ' ';
bin2hex (grip2, 20, p);