diff options
author | NIIBE Yutaka <[email protected]> | 2017-01-18 06:19:38 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2017-01-18 06:19:38 +0000 |
commit | 8b1f24a29ebc7651437c01990215a55b1136dae0 (patch) | |
tree | 0993bc9774f78b0428143135806ec38a3004becf /scd/app.c | |
parent | build: Handle packages with dashes in --find-version. (diff) | |
download | gnupg-8b1f24a29ebc7651437c01990215a55b1136dae0.tar.gz gnupg-8b1f24a29ebc7651437c01990215a55b1136dae0.zip |
scd: Add "card_list" sub command for GETINFO.
* scd/app.c (app_send_card_list): New.
* scd/command.c (cmd_getinfo): Fix "status" sub command.
Add "card_list" sub command.
Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to '')
-rw-r--r-- | scd/app.c | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -1103,3 +1103,21 @@ app_list_finish (void) { npth_mutex_unlock (&app_list_lock); } + +void +app_send_card_list (ctrl_t ctrl) +{ + app_t a; + char buf[65]; + + npth_mutex_lock (&app_list_lock); + for (a = app_top; a; a = a->next) + { + if (DIM (buf) < 2 * a->serialnolen + 1) + continue; + + bin2hex (a->serialno, a->serialnolen, buf); + send_status_direct (ctrl, "SERIALNO", buf); + } + npth_mutex_unlock (&app_list_lock); +} |