mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
card: New command "apdu"
* tools/card-call-scd.c (scd_apdu): Add optional arg 'options'. * tools/gpg-card.c (cmd_apdu): New. (enum cmdids): Add cmdAPDU. (dispatch_command): Add command "apdu". (interactive_loop): Ditto. -- This command is hidden because it can be used to brick a card. The command is basically the same as sending "scd apdu" in gpg-connect-agent but here we do full decoding and printing in hex. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
94d31660c6
commit
ed0759f39b
4 changed files with 108 additions and 9 deletions
|
@ -88,7 +88,7 @@ send_apdu (const char *hexapdu, const char *desc, unsigned int ignore,
|
|||
gpg_error_t err;
|
||||
unsigned int sw;
|
||||
|
||||
err = scd_apdu (hexapdu, &sw, r_data, r_datalen);
|
||||
err = scd_apdu (hexapdu, NULL, &sw, r_data, r_datalen);
|
||||
if (err)
|
||||
log_error ("sending card command %s failed: %s\n", desc,
|
||||
gpg_strerror (err));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue