[Pkg-gnupg-commit] [gnupg2] 96/166: agent: No cards is not an error.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Thu Mar 16 22:33:09 UTC 2017
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch experimental
in repository gnupg2.
commit dea4b3c742acbd195d6ab12b279b4dda315f2582
Author: NIIBE Yutaka <gniibe at fsij.org>
Date: Fri Feb 17 20:02:38 2017 +0900
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 <gniibe at fsij.org>
---
agent/command-ssh.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/agent/command-ssh.c b/agent/command-ssh.c
index 2c74618..7298700 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));
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git
More information about the Pkg-gnupg-commit
mailing list