diff options
author | Werner Koch <wk@gnupg.org> | 2020-11-09 14:46:35 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2020-11-09 14:46:35 +0100 |
commit | 12fd10791f1dec4ec42810d7b92c69e1ae2327b9 (patch) | |
tree | 52dcec153b233ad0cebd827b1f78836fcf25f5c7 /g10/call-agent.c | |
parent | card: Run factory-reset in locked stated. (diff) | |
download | gnupg2-12fd10791f1dec4ec42810d7b92c69e1ae2327b9.tar.xz gnupg2-12fd10791f1dec4ec42810d7b92c69e1ae2327b9.zip |
card: Run factory-reset in locked stated also in gpg-card.
* tools/card-call-scd.c (scd_apdu): Add more pseudo APDUs.
* tools/card-misc.c (send_apdu): Handle them.
* tools/gpg-card.c (cmd_factoryreset): Use lock commands.
--
This is port of the code used with gpg-card-edit. Note that the
command "apdu" now also understands some extra keywords.
Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'g10/call-agent.c')
-rw-r--r-- | g10/call-agent.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/g10/call-agent.c b/g10/call-agent.c index 01f59aca8..35fb615f0 100644 --- a/g10/call-agent.c +++ b/g10/call-agent.c @@ -974,8 +974,9 @@ agent_scd_keypairinfo (ctrl_t ctrl, const char *keyref, keypair_info_t *r_list) /* Send an APDU to the current card. On success the status word is - * stored at R_SW. With HEXAPDU being NULL only a RESET command is - * send to scd. HEXAPDU may also be one of these special strings: + * stored at R_SW unless R_SQ is NULL. With HEXAPDU being NULL only a + * RESET command is send to scd. HEXAPDU may also be one of theseo + * special strings: * * "undefined" :: Send the command "SCD SERIALNO undefined" * "lock" :: Send the command "SCD LOCK --wait" |