Skip to content

Commit

Permalink
Merge pull request #18 from LedgerHQ/manifest
Browse files Browse the repository at this point in the history
[add] manifest
  • Loading branch information
lpascal-ledger committed Dec 15, 2023
2 parents 3051c6f + 646ccfc commit ef798e7
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 6 deletions.
1 change: 0 additions & 1 deletion .github/workflows/build_tests_and_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jobs:
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_ragger_tests.yml@v1
with:
download_app_binaries_artifact: compiled_app_binaries
test_dir: tests/functional
run_for_devices: '["stax"]'

unittesting:
Expand Down
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ endif

# Build configuration

DEFINES += APPNAME=\"$(APPNAME)\"
DEFINES += APPVERSION=\"$(APPVERSION)\"
DEFINES += LEDGER_MAJOR_VERSION=$(APPVERSION_M)
DEFINES += LEDGER_MINOR_VERSION=$(APPVERSION_N)
Expand Down
8 changes: 8 additions & 0 deletions ledger_app.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[app]
build_directory = "./"
sdk = "C"
devices = ["nanos", "nanox", "nanos+", "stax"]

[tests]
unit_directory = "./tests/unit"
pytest_directory = "./tests/functional"
7 changes: 5 additions & 2 deletions src/nano/nanos_enter_phrase.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

#include <os_io_seproxyhal.h>
#include <lcx_hmac.h>
#include <ledger_assert.h>

#include "constants.h"
#include "glyphs.h"
Expand Down Expand Up @@ -229,8 +230,10 @@ void compare_recovery_phrase(void) {
cx_hmac_sha512_t ctx;
const char key[] = "Bitcoin seed";

cx_hmac_sha512_init_no_throw(&ctx, (const uint8_t*) key, strlen(key));
cx_hmac_no_throw((cx_hmac_t*) &ctx, CX_LAST, buffer, 64, buffer, 64);
LEDGER_ASSERT(cx_hmac_sha512_init_no_throw(&ctx, (const uint8_t*) key, strlen(key)) == CX_OK,
"HMAC init failed");
LEDGER_ASSERT(cx_hmac_no_throw((cx_hmac_t*) &ctx, CX_LAST, buffer, 64, buffer, 64) == CX_OK,
"HMAC failed");
PRINTF("Root key from input:\n%.*H\n", 64, buffer);

// get rootkey from device's seed
Expand Down
7 changes: 5 additions & 2 deletions src/nano/nanox_enter_phrase.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

#include <lcx_hmac.h>
#include <lcx_rng.h>
#include <ledger_assert.h>

#include "../constants.h"
#include "../ui.h"
Expand Down Expand Up @@ -410,8 +411,10 @@ static uint8_t compare_recovery_phrase(void) {
cx_hmac_sha512_t ctx;
const char key[] = "Bitcoin seed";

cx_hmac_sha512_init_no_throw(&ctx, (const uint8_t*) key, strlen(key));
cx_hmac_no_throw((cx_hmac_t*) &ctx, CX_LAST, buffer, 64, buffer, 64);
LEDGER_ASSERT(cx_hmac_sha512_init_no_throw(&ctx, (const uint8_t*) key, strlen(key)) == CX_OK,
"HMAC init failed");
LEDGER_ASSERT(cx_hmac_no_throw((cx_hmac_t*) &ctx, CX_LAST, buffer, 64, buffer, 64) == CX_OK,
"HMAC failed");
PRINTF("Root key from input:\n%.*H\n", 64, buffer);

// get rootkey from device's seed
Expand Down
Binary file modified tests/functional/snapshots/stax/check_previous_word/00003.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/functional/snapshots/stax/check_previous_word/00005.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ef798e7

Please sign in to comment.