aboutsummaryrefslogtreecommitdiffstats
path: root/agent/command-ssh.c
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2017-02-17 11:02:38 +0000
committerNIIBE Yutaka <[email protected]>2017-02-17 11:02:38 +0000
commitdea4b3c742acbd195d6ab12b279b4dda315f2582 (patch)
tree8d99f5d771ef1e58bb106abf95a7bf70910bc754 /agent/command-ssh.c
parentagent: Send back all public keys for available cards. (diff)
downloadgnupg-dea4b3c742acbd195d6ab12b279b4dda315f2582.tar.gz
gnupg-dea4b3c742acbd195d6ab12b279b4dda315f2582.zip
agent: No cards is not an error.
* agent/command-ssh.c (card_key_list): Care the case of no cards. Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to '')
-rw-r--r--agent/command-ssh.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/agent/command-ssh.c b/agent/command-ssh.c
index 2c74618d6..729870045 100644
--- a/agent/command-ssh.c
+++ b/agent/command-ssh.c
@@ -2387,9 +2387,15 @@ card_key_list (ctrl_t ctrl, char **r_serialno, strlist_t *result)
{
gpg_error_t err;
+ *r_serialno = NULL;
+ *result = NULL;
+
err = agent_card_serialno (ctrl, r_serialno, NULL);
if (err)
{
+ if (gpg_err_code (err) == GPG_ERR_ENODEV)
+ return 0; /* Nothing available. */
+
if (opt.verbose)
log_info (_("error getting serial number of card: %s\n"),
gpg_strerror (err));