add reset placeholder

This commit is contained in:
merlokk 2019-08-22 15:12:59 +03:00 committed by Conor Patrick
parent dfb124dc8b
commit c79b7abfb6
2 changed files with 10 additions and 0 deletions

View File

@ -42,6 +42,10 @@ extern int apdu_decode(uint8_t *data, size_t len, APDU_STRUCT *apdu);
#define APDU_FIDO_U2F_AUTHENTICATE 0x02 #define APDU_FIDO_U2F_AUTHENTICATE 0x02
#define APDU_FIDO_U2F_VERSION 0x03 #define APDU_FIDO_U2F_VERSION 0x03
#define APDU_FIDO_NFCCTAP_MSG 0x10 #define APDU_FIDO_NFCCTAP_MSG 0x10
#define APDU_FIDO_U2F_VENDOR_FIRST 0xc0 // First vendor defined command
#define APDU_FIDO_U2F_VENDOR_LAST 0xff // Last vendor defined command
#define APDU_SOLO_RESET 0xee
#define APDU_INS_SELECT 0xA4 #define APDU_INS_SELECT 0xA4
#define APDU_INS_READ_BINARY 0xB0 #define APDU_INS_READ_BINARY 0xB0
#define APDU_GET_RESPONSE 0xC0 #define APDU_GET_RESPONSE 0xC0

View File

@ -756,6 +756,12 @@ void apdu_process(uint8_t buf0, uint8_t *apduptr, APDU_STRUCT *apdu)
} }
break; break;
case APDU_SOLO_RESET:
printf1(TAG_NFC, "Reset...\r\n");
delay(10);
nfc_write_response(buf0, SW_INS_INVALID);
break;
default: default:
printf1(TAG_NFC, "Unknown INS %02x\r\n", apdu->ins); printf1(TAG_NFC, "Unknown INS %02x\r\n", apdu->ins);
nfc_write_response(buf0, SW_INS_INVALID); nfc_write_response(buf0, SW_INS_INVALID);