aboutsummaryrefslogtreecommitdiffstats
path: root/agent
diff options
context:
space:
mode:
Diffstat (limited to 'agent')
-rw-r--r--agent/command-ssh.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/agent/command-ssh.c b/agent/command-ssh.c
index 47c546bdc..8e812a643 100644
--- a/agent/command-ssh.c
+++ b/agent/command-ssh.c
@@ -2585,7 +2585,7 @@ ssh_send_available_keys (ctrl_t ctrl, estream_t key_blobs, u32 *r_key_counter)
struct card_key_info_s *keyinfo_on_cards, *l;
char *cardsn;
gcry_sexp_t key_public = NULL;
- int count;
+ int count, skipped;
struct key_collection_s keyarray = { NULL };
err = open_control_file (&cf, 0);
@@ -2753,6 +2753,7 @@ ssh_send_available_keys (ctrl_t ctrl, estream_t key_blobs, u32 *r_key_counter)
keyarray.items[count].key, keyarray.items[count].cardsn);
/* And print the keys. */
+ skipped = 0;
for (count=0; count < keyarray.nitems; count++)
{
err = ssh_send_key_public (key_blobs, keyarray.items[count].key,
@@ -2767,12 +2768,13 @@ ssh_send_available_keys (ctrl_t ctrl, estream_t key_blobs, u32 *r_key_counter)
/* For example a Brainpool curve or a curve we don't
* support at all but a smartcard lists that curve.
* We ignore them. */
+ skipped++;
}
else
goto leave;
}
}
- *r_key_counter = count;
+ *r_key_counter = count - skipped;
leave:
agent_card_free_keyinfo (keyinfo_on_cards);