From 73230c8d15ada353f6d0bc8cfcf69fde7af6b057 Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 13 Nov 2018 22:29:33 +0100 Subject: [PATCH] chg: 'trace list 7816' - missing command chg: 'sc raw' - inverted select logic --- client/cmdhflist.c | 1 + client/cmdsmartcard.c | 4 ++-- include/mifare.h | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/client/cmdhflist.c b/client/cmdhflist.c index 2deab204c..14dcc6039 100644 --- a/client/cmdhflist.c +++ b/client/cmdhflist.c @@ -356,6 +356,7 @@ void annotateIso7816(char *exp, size_t size, uint8_t* cmd, uint8_t cmdsize){ case ISO7816_EXTERNAL_AUTHENTICATION :snprintf(exp, size, "EXTERNAL AUTH");break; case ISO7816_GET_CHALLENGE :snprintf(exp, size, "GET CHALLENGE");break; case ISO7816_MANAGE_CHANNEL :snprintf(exp, size, "MANAGE CHANNEL");break; + case ISO7816_GETSTATUS :snprintf(exp, size, "GET RESPONSE");break; default :snprintf(exp,size,"?"); break; } } diff --git a/client/cmdsmartcard.c b/client/cmdsmartcard.c index a7b45c51d..c9997f241 100644 --- a/client/cmdsmartcard.c +++ b/client/cmdsmartcard.c @@ -200,8 +200,8 @@ int CmdSmartRaw(const char *Cmd) { if (active || active_select) { c.arg[0] |= SC_CONNECT; - if (active) - c.arg[0] |= SC_NO_SELECT; + if (active_select) + c.arg[0] |= SC_SELECT; } if (hexlen > 0) { diff --git a/include/mifare.h b/include/mifare.h index 2ab7e3741..63cdf0fb6 100644 --- a/include/mifare.h +++ b/include/mifare.h @@ -109,7 +109,7 @@ typedef enum SMARTCARD_COMMAND { SC_CONNECT = (1 << 0), SC_NO_DISCONNECT = (1 << 1), SC_RAW = (1 << 2), - SC_NO_SELECT = (1 << 3) + SC_SELECT = (1 << 3) } smartcard_command_t; //-----------------------------------------------------------------------------