1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

Enable readline support in --card-edit.

better cope with re-inserted cards.
This commit is contained in:
Werner Koch 2009-08-05 13:48:23 +00:00
parent e57d2a8630
commit f27bdef888
3 changed files with 26 additions and 12 deletions

View file

@ -458,6 +458,19 @@ agent_learn (struct agent_card_info_s *info)
if (rc)
return rc;
/* Send the serialno command to initialize the connection. We don't
care about the data returned. If the card has already been
initialized, this is a very fast command. The main reason we
need to do this here is to handle a card removed case so that an
"l" command in --card-edit can be used to show ta newly inserted
card. We request the openpgp card because that is what we
expect. */
rc = assuan_transact (agent_ctx, "SCD SERIALNO openpgp",
NULL, NULL, NULL, NULL, NULL, NULL);
if (rc)
return rc;
memset (info, 0, sizeof *info);
rc = assuan_transact (agent_ctx, "SCD LEARN --force",
dummy_data_cb, NULL, default_inq_cb, NULL,