mirror of
git://git.gnupg.org/gnupg.git
synced 2025-03-11 22:52:47 +01:00
g10: Return proper error when gpg-agent fails to start during probe.
* g10/getkey.c (lookup): Return immediately on any other error than GPG_ERR_NO_SECKEY from agent_probe_any_secret_key. Signed-off-by: Marcus Brinkmann <mb@g10code.com> GnuPG-bug-id: 2204
This commit is contained in:
parent
69614d5501
commit
9998b162b4
@ -3741,8 +3741,14 @@ lookup (ctrl_t ctrl, getkey_ctx_t ctx, int want_secret,
|
||||
goto skip;
|
||||
}
|
||||
|
||||
if (want_secret && agent_probe_any_secret_key (NULL, keyblock))
|
||||
if (want_secret)
|
||||
{
|
||||
rc = agent_probe_any_secret_key (NULL, keyblock);
|
||||
if (gpg_err_code(rc) == GPG_ERR_NO_SECKEY)
|
||||
goto skip; /* No secret key available. */
|
||||
if (rc)
|
||||
goto found; /* Unexpected error. */
|
||||
}
|
||||
|
||||
/* Warning: node flag bits 0 and 1 should be preserved by
|
||||
* merge_selfsigs. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user