add u2f errors

This commit is contained in:
merlokk 2019-01-24 20:04:44 +02:00
parent 67b0abde4b
commit e8634a2d61
2 changed files with 4 additions and 0 deletions

View File

@ -208,10 +208,13 @@ void nfc_process_iblock(uint8_t * buf, int len)
case APDU_FIDO_U2F_REGISTER: case APDU_FIDO_U2F_REGISTER:
printf1(TAG_NFC, "U2F Register command.\r\n"); printf1(TAG_NFC, "U2F Register command.\r\n");
nfc_write_response(buf[0], SW_COND_USE_NOT_SATISFIED);
break; break;
case APDU_FIDO_U2F_AUTHENTICATE: case APDU_FIDO_U2F_AUTHENTICATE:
printf1(TAG_NFC, "U2F Authenticate command.\r\n"); printf1(TAG_NFC, "U2F Authenticate command.\r\n");
nfc_write_response(buf[0], SW_COND_USE_NOT_SATISFIED);
break; break;
case APDU_FIDO_NFCCTAP_MSG: case APDU_FIDO_NFCCTAP_MSG:

View File

@ -67,6 +67,7 @@ typedef enum
} APPLETS; } APPLETS;
#define SW_SUCCESS 0x9000 #define SW_SUCCESS 0x9000
#define SW_COND_USE_NOT_SATISFIED 0x6985
#define SW_FILE_NOT_FOUND 0x6a82 #define SW_FILE_NOT_FOUND 0x6a82
#define SW_INS_INVALID 0x6d00 #define SW_INS_INVALID 0x6d00
#define SW_INTERNAL_EXCEPTION 0x6f00 #define SW_INTERNAL_EXCEPTION 0x6f00