diff options
author | NIIBE Yutaka <[email protected]> | 2022-05-26 05:08:27 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2022-05-26 08:07:31 +0000 |
commit | c07c79a1d795ac8f50981637fe32383abb3e969d (patch) | |
tree | 4b333a628b683a85f5b738729b500625f3b88f71 | |
parent | agent: Handle USAGE information in KEYINFO. (diff) | |
download | gnupg-c07c79a1d795ac8f50981637fe32383abb3e969d.tar.gz gnupg-c07c79a1d795ac8f50981637fe32383abb3e969d.zip |
agent: Fix get_keyinfo_on_cards.
* agent/command.c (get_keyinfo_on_cards): Make it static. Don't
return bogus value on error. Return NULL when scdaemon is disabled.
--
Signed-off-by: NIIBE Yutaka <[email protected]>
-rw-r--r-- | agent/command.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/agent/command.c b/agent/command.c index 2058c2a59..6faca6219 100644 --- a/agent/command.c +++ b/agent/command.c @@ -445,10 +445,13 @@ leave_cmd (assuan_context_t ctx, gpg_error_t err) /* Take the keyinfo for cards from our local cache. Actually this * cache could be a global one but then we would need to employ * reference counting. */ -struct card_key_info_s * +static struct card_key_info_s * get_keyinfo_on_cards (ctrl_t ctrl) { - struct card_key_info_s *keyinfo_on_cards; + struct card_key_info_s *keyinfo_on_cards = NULL; + + if (opt.disable_daemon[DAEMON_SCD]) + return NULL; if (ctrl->server_local->last_card_keyinfo.ki && ctrl->server_local->last_card_keyinfo.eventno == eventcounter.card |