From 12fd10791f1dec4ec42810d7b92c69e1ae2327b9 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Mon, 9 Nov 2020 14:46:35 +0100 Subject: 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 --- g10/call-agent.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'g10/call-agent.c') 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" -- cgit v1.2.3