aboutsummaryrefslogtreecommitdiffstats
path: root/scd/app-openpgp.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2014-12-15 16:38:40 +0000
committerWerner Koch <[email protected]>2014-12-15 16:38:40 +0000
commitdd65e21cb4934b40e6f2f7a8095f39fd6d9971bc (patch)
tree789d4242e852d337de44a0195badb5e577a1ccae /scd/app-openpgp.c
parentgpg: Fix regression in notation data regression. (diff)
downloadgnupg-dd65e21cb4934b40e6f2f7a8095f39fd6d9971bc.tar.gz
gnupg-dd65e21cb4934b40e6f2f7a8095f39fd6d9971bc.zip
gpg: Add sub-command "factory-reset" to --card-edit.
* common/util.h (GPG_ERR_OBJ_TERM_STATE): New. * scd/iso7816.c (map_sw): Add this error code. * scd/app-openpgp.c (do_getattr): Return the life cycle indicator. * scd/app.c (select_application): Allow a return value of GPG_ERR_OBJ_TERM_STATE. * scd/scdaemon.c (set_debug): Print the DBG_READER value. * g10/call-agent.c (start_agent): Print a status line for the termination state. (agent_scd_learn): Make arg "info" optional. (agent_scd_apdu): New. * g10/card-util.c (send_apdu): New. (factory_reset): New. (card_edit): Add command factory-reset. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'scd/app-openpgp.c')
-rw-r--r--scd/app-openpgp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/scd/app-openpgp.c b/scd/app-openpgp.c
index ac290c9ac..daf0310e8 100644
--- a/scd/app-openpgp.c
+++ b/scd/app-openpgp.c
@@ -1073,10 +1073,10 @@ do_getattr (app_t app, ctrl_t ctrl, const char *name)
}
if (table[idx].special == -2)
{
- char tmp[100];
+ char tmp[110];
snprintf (tmp, sizeof tmp,
- "gc=%d ki=%d fc=%d pd=%d mcl3=%u aac=%d sm=%d",
+ "gc=%d ki=%d fc=%d pd=%d mcl3=%u aac=%d sm=%d si=%u",
app->app_local->extcap.get_challenge,
app->app_local->extcap.key_import,
app->app_local->extcap.change_force_chv,
@@ -1085,7 +1085,8 @@ do_getattr (app_t app, ctrl_t ctrl, const char *name)
app->app_local->extcap.algo_attr_change,
(app->app_local->extcap.sm_supported
? (app->app_local->extcap.sm_aes128? 7 : 2)
- : 0));
+ : 0),
+ app->app_local->status_indicator);
send_status_info (ctrl, table[idx].name, tmp, strlen (tmp), NULL, 0);
return 0;
}