mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
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 <wk@gnupg.org>
This commit is contained in:
parent
fc9a35d2de
commit
dd65e21cb4
10 changed files with 252 additions and 15 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue