summaryrefslogtreecommitdiffstats
path: root/common
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 /common
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 'common')
-rw-r--r--common/util.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/util.h b/common/util.h
index a6f86069a..94878bc36 100644
--- a/common/util.h
+++ b/common/util.h
@@ -38,7 +38,8 @@
/* These error codes are used but not defined in the required
libgpg-error version. Define them here. */
#if GPG_ERROR_VERSION_NUMBER < 0x011200 /* 1.18 */
-# define GPG_ERR_FORBIDDEN 251
+# define GPG_ERR_OBJ_TERM_STATE 225
+# define GPG_ERR_FORBIDDEN 251
#endif