diff options
author | Werner Koch <[email protected]> | 2009-08-05 13:48:23 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2009-08-05 13:48:23 +0000 |
commit | f27bdef888249718930c0212c1954c6910f9de1e (patch) | |
tree | a4d4ac9d78f6b0dc3282e2da076bc52270a2824c /g10/call-agent.c | |
parent | Ask for the keysize when generating a new card key. (diff) | |
download | gnupg-f27bdef888249718930c0212c1954c6910f9de1e.tar.gz gnupg-f27bdef888249718930c0212c1954c6910f9de1e.zip |
Enable readline support in --card-edit.
better cope with re-inserted cards.
Diffstat (limited to 'g10/call-agent.c')
-rw-r--r-- | g10/call-agent.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/g10/call-agent.c b/g10/call-agent.c index 8a0b21a7a..64b5cd857 100644 --- a/g10/call-agent.c +++ b/g10/call-agent.c @@ -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, |