summaryrefslogtreecommitdiffstats
path: root/g10/call-agent.h
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2014-12-15 17:38:40 +0100
committerWerner Koch <wk@gnupg.org>2014-12-15 17:38:40 +0100
commitdd65e21cb4934b40e6f2f7a8095f39fd6d9971bc (patch)
tree789d4242e852d337de44a0195badb5e577a1ccae /g10/call-agent.h
parentgpg: Fix regression in notation data regression. (diff)
downloadgnupg2-dd65e21cb4934b40e6f2f7a8095f39fd6d9971bc.tar.xz
gnupg2-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 <wk@gnupg.org>
Diffstat (limited to 'g10/call-agent.h')
-rw-r--r--g10/call-agent.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/g10/call-agent.h b/g10/call-agent.h
index a24941e4d..bcb5ae9f5 100644
--- a/g10/call-agent.h
+++ b/g10/call-agent.h
@@ -61,6 +61,7 @@ struct agent_card_info_s
unsigned int ki:1; /* Key import available. */
unsigned int aac:1; /* Algorithm attributes are changeable. */
} extcap;
+ unsigned int status_indicator;
};
struct agent_card_genkey_s {
@@ -78,6 +79,9 @@ void agent_release_card_info (struct agent_card_info_s *info);
/* Return card info. */
int agent_scd_learn (struct agent_card_info_s *info);
+/* Send an APDU to the card. */
+gpg_error_t agent_scd_apdu (const char *hexapdu, unsigned int *r_sw);
+
/* Update INFO with the attribute NAME. */
int agent_scd_getattr (const char *name, struct agent_card_info_s *info);