mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
scd: Make SERIALNO --all work correctly and use it.
* scd/app.c (maybe_switch_app): Factor reselect code out to ... (run_reselect): new. (app_write_learn_status): Tweak diagnostics. (app_do_with_keygrip): Run reselect if a card has more than one switchable application. * agent/call-scd.c (agent_card_serialno): Ditto. * tools/card-call-scd.c (start_agent): Use option --all with SERIALNO. (scd_serialno): Ditto. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
15028627a1
commit
0e48aa0849
5 changed files with 94 additions and 57 deletions
|
@ -360,7 +360,7 @@ start_agent (unsigned int flags)
|
|||
err = warn_version_mismatch (agent_ctx, SCDAEMON_NAME, 2);
|
||||
|
||||
if (!err)
|
||||
err = assuan_transact (agent_ctx, "SCD SERIALNO",
|
||||
err = assuan_transact (agent_ctx, "SCD SERIALNO --all",
|
||||
NULL, NULL, NULL, NULL,
|
||||
learn_status_cb, &info);
|
||||
if (err && !(flags & START_AGENT_SUPPRESS_ERRORS))
|
||||
|
@ -1284,7 +1284,7 @@ scd_serialno (char **r_serialno, const char *demand)
|
|||
return err;
|
||||
|
||||
if (!demand)
|
||||
strcpy (line, "SCD SERIALNO");
|
||||
strcpy (line, "SCD SERIALNO --all");
|
||||
else
|
||||
snprintf (line, DIM(line), "SCD SERIALNO --demand=%s", demand);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue