Skip to content

Commit

Permalink
[clean] Minor INS renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
lpascal-ledger committed Sep 27, 2024
1 parent c4f7e0e commit 0442270
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ DEFINES += RK_SIZE=6144
endif

DEFINES += HAVE_DEBUG_THROWS

#DEFINES += HAVE_CBOR_DEBUG


Expand Down
2 changes: 1 addition & 1 deletion include/globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ static const uint8_t FIDO_AID[FIDO_AID_SIZE] = {0xA0, 0x00, 0x00, 0x06, 0x47, 0x
#define OFFSET_P2 3

#define FIDO_CLA 0x00
#define FIDO_INS_ENROLL 0x01
#define FIDO_INS_REGISTER 0x01
#define FIDO_INS_SIGN 0x02
#define FIDO_INS_GET_VERSION 0x03
#define FIDO_INS_CTAP2_PROXY 0x10
Expand Down
2 changes: 1 addition & 1 deletion include/nfc_io.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ bool nfc_io_is_response_pending(void);

/*
* Sends a previously prepared response through NFC, then (if successful) displays a status screen
* (usgin app_nbgl_status). Depending on `display_infos`, this screen will contain additional
* (using `app_nbgl_status`). Depending on `display_infos`, this screen will contain additional
* information such as the relying party name and/or the user credential.
*
* @param display_infos If the displayed status screen should contain RP/user information or not.
Expand Down
4 changes: 2 additions & 2 deletions src/u2f_processing.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ static int u2f_handle_apdu_enroll(const uint8_t *rx, uint32_t data_length, const
}

// Backup ins, challenge and application parameters to be used if user accept the request
globals_get_u2f_data()->ins = FIDO_INS_ENROLL;
globals_get_u2f_data()->ins = FIDO_INS_REGISTER;
memmove(globals_get_u2f_data()->challenge_param,
reg_req->challenge_param,
sizeof(reg_req->challenge_param));
Expand Down Expand Up @@ -356,7 +356,7 @@ int u2f_handle_apdu(uint8_t *rx, int rx_length) {

if (rx[OFFSET_CLA] == FIDO_CLA) {
switch (rx[OFFSET_INS]) {
case FIDO_INS_ENROLL:
case FIDO_INS_REGISTER:
PRINTF("enroll\n");
return u2f_handle_apdu_enroll(rx, data_length, data);

Expand Down
2 changes: 1 addition & 1 deletion src/u2f_processing_flow.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ static int u2f_process_user_presence_confirmed(void) {
uint16_t length = 0;

switch (globals_get_u2f_data()->ins) {
case FIDO_INS_ENROLL:
case FIDO_INS_REGISTER:
sw = u2f_prepare_enroll_response(responseBuffer, &length);
break;

Expand Down

0 comments on commit 0442270

Please sign in to comment.