diff --git a/client/cmdhfmfdes.c b/client/cmdhfmfdes.c index 3d805631d..add158e0e 100644 --- a/client/cmdhfmfdes.c +++ b/client/cmdhfmfdes.c @@ -177,8 +177,8 @@ static desfire_cardtype_t getCardType(uint8_t major, uint8_t minor) { //none static int test_desfire_authenticate() { - uint8_t c = 0x00; - sAPDU apdu = {0x90, MFDES_AUTHENTICATE, 0x00, 0x00, 0x01, &c}; // 0x0A, KEY 0 + uint8_t data[] = {0x00}; + sAPDU apdu = {0x90, MFDES_AUTHENTICATE, 0x00, 0x00, 0x01, data}; // 0x0A, KEY 0 int recv_len = 0; uint16_t sw = 0; return send_desfire_cmd(&apdu, false, NULL, &recv_len, &sw, 0); @@ -186,8 +186,8 @@ static int test_desfire_authenticate() { // none static int test_desfire_authenticate_iso() { - uint8_t c = 0x00; - sAPDU apdu = {0x90, MFDES_AUTHENTICATE_ISO, 0x00, 0x00, 0x01, &c}; // 0x1A, KEY 0 + uint8_t data[] = {0x00}; + sAPDU apdu = {0x90, MFDES_AUTHENTICATE_ISO, 0x00, 0x00, 0x01, data}; // 0x1A, KEY 0 int recv_len = 0; uint16_t sw = 0; return send_desfire_cmd(&apdu, false, NULL, &recv_len, &sw, 0); @@ -195,8 +195,8 @@ static int test_desfire_authenticate_iso() { //none static int test_desfire_authenticate_aes() { - uint8_t c = 0x00; - sAPDU apdu = {0x90, MFDES_AUTHENTICATE_AES, 0x00, 0x00, 0x01, &c}; // 0xAA, KEY 0 + uint8_t data[] = {0x00}; + sAPDU apdu = {0x90, MFDES_AUTHENTICATE_AES, 0x00, 0x00, 0x01, data}; // 0xAA, KEY 0 int recv_len = 0; uint16_t sw = 0; return send_desfire_cmd(&apdu, false, NULL, &recv_len, &sw, 0); @@ -210,7 +210,7 @@ static int desfire_print_freemem(uint32_t free_mem) { // init / disconnect static int get_desfire_freemem(uint32_t *free_mem) { - sAPDU apdu = {0x90, MFDES_GET_FREE_MEMORY, 0x00, 0x00, 0x00, NONE}; // 0x6E + sAPDU apdu = {0x90, MFDES_GET_FREE_MEMORY, 0x00, 0x00, 0x00, NULL}; // 0x6E int recv_len = 0; uint16_t sw = 0; uint8_t fmem[4] = {0}; @@ -335,7 +335,7 @@ static int desfire_print_keysetting(uint8_t key_settings, uint8_t num_keys) { // none static int get_desfire_keysettings(uint8_t *key_settings, uint8_t *num_keys) { - sAPDU apdu = {0x90, MFDES_GET_KEY_SETTINGS, 0x00, 0x00, 0x00, NONE}; //0x45 + sAPDU apdu = {0x90, MFDES_GET_KEY_SETTINGS, 0x00, 0x00, 0x00, NULL}; //0x45 int recv_len = 0; uint16_t sw = 0; uint8_t data[2] = {0};