-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from steel97/stax-flex
Stax/flex support
- Loading branch information
Showing
45 changed files
with
1,228 additions
and
461 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
[app] | ||
build_directory = "./" | ||
sdk = "C" | ||
devices = ["nanos", "nanox", "nanos+"] | ||
devices = ["nanox", "nanos+", "stax", "flex"] | ||
|
||
[tests] | ||
unit_directory = "./unit-tests/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#ifdef HAVE_NBGL | ||
|
||
#include <os.h> | ||
#include <nbgl_use_case.h> | ||
#include <string.h> | ||
#include <glyphs.h> | ||
|
||
#include "ainpt_ui.h" | ||
#include "ainpt_response.h" | ||
#include "../../context.h" | ||
#include "../../common/macros_ext.h" | ||
#include "../../helpers/response.h" | ||
#include "../../ui/ui_application_id.h" | ||
#include "../../ui/ui_menu.h" | ||
#include "../../ui/ui_main.h" | ||
#include "../../ui/display.h" | ||
|
||
#define APPLICATION_ID_SUBLEN APPLICATION_ID_STR_LEN + 13 | ||
static char sub_message[APPLICATION_ID_SUBLEN]; | ||
|
||
void ui_action_attest_input(bool approved) { | ||
set_flow_response(approved); | ||
} | ||
|
||
int ui_display_access_token(uint32_t app_access_token, attest_input_ctx_t* context) { | ||
context->ui.app_token_value = app_access_token; | ||
|
||
if (app_access_token != 0) { | ||
ui_application_id_screen(app_access_token, context->ui.app_token); | ||
memset(sub_message, 0, APPLICATION_ID_SUBLEN); | ||
snprintf(sub_message, APPLICATION_ID_SUBLEN, "Application: 0x%08x", app_access_token); | ||
} | ||
|
||
nbgl_useCaseChoice(&VALIDATE_ICON, | ||
"Confirm Attest Input", | ||
sub_message, | ||
"Confirm", | ||
"Reject", | ||
ui_action_attest_input); | ||
bool approved = io_ui_process(); | ||
|
||
if (approved) { | ||
app_set_connected_app_id(context->ui.app_token_value); | ||
context->state = ATTEST_INPUT_STATE_APPROVED; | ||
send_response_attested_input_session_id(context->session); | ||
|
||
} else { | ||
app_set_current_command(CMD_NONE); | ||
res_deny(); | ||
|
||
ui_menu_main(); | ||
} | ||
|
||
return 0; | ||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.