Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
juditortiz10 committed Jan 30, 2024
1 parent ce5e9d1 commit 8e46236
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
2 changes: 0 additions & 2 deletions app/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ endif

APP_LOAD_PARAMS = --curve ed25519 $(COMMON_LOAD_PARAMS) --path $(APPPATH)

NANOS_STACK_SIZE := 2440

include $(CURDIR)/../deps/ledger-zxlib/makefiles/Makefile.devices

$(info TARGET_NAME = [$(TARGET_NAME)])
Expand Down
14 changes: 7 additions & 7 deletions app/src/crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ zxerr_t crypto_extractPublicKey(uint8_t *pubKey, uint16_t pubKeyLen) {
privateKeyData,
NULL,
NULL,
0))
0));

CATCH_CXERROR(cx_ecfp_init_private_key_no_throw(CX_CURVE_Ed25519, privateKeyData, 32, &cx_privateKey))
CATCH_CXERROR(cx_ecfp_init_public_key_no_throw(CX_CURVE_Ed25519, NULL, 0, &cx_publicKey))
CATCH_CXERROR(cx_ecfp_generate_pair_no_throw(CX_CURVE_Ed25519, &cx_publicKey, &cx_privateKey, 1))
CATCH_CXERROR(cx_ecfp_init_private_key_no_throw(CX_CURVE_Ed25519, privateKeyData, 32, &cx_privateKey));
CATCH_CXERROR(cx_ecfp_init_public_key_no_throw(CX_CURVE_Ed25519, NULL, 0, &cx_publicKey));
CATCH_CXERROR(cx_ecfp_generate_pair_no_throw(CX_CURVE_Ed25519, &cx_publicKey, &cx_privateKey, 1));

for (unsigned int i = 0; i < PK_LEN_25519; i++) {
pubKey[i] = cx_publicKey.W[64 - i];
Expand Down Expand Up @@ -83,15 +83,15 @@ zxerr_t crypto_sign(uint8_t *signature, uint16_t signatureMaxlen, const uint8_t
privateKeyData,
NULL,
NULL,
0))
0));

CATCH_CXERROR(cx_ecfp_init_private_key_no_throw(CX_CURVE_Ed25519, privateKeyData, 32, &cx_privateKey))
CATCH_CXERROR(cx_ecfp_init_private_key_no_throw(CX_CURVE_Ed25519, privateKeyData, 32, &cx_privateKey));
CATCH_CXERROR(cx_eddsa_sign_no_throw(&cx_privateKey,
CX_SHA512,
message,
messageLen,
signature,
signatureMaxlen))
signatureMaxlen));
error = zxerr_ok;

catch_cx_error:
Expand Down
5 changes: 4 additions & 1 deletion app/src/parser_encoding.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ parser_error_t b64hash_data(unsigned char *data, size_t data_len, char *b64hash,
cx_sha256_t ctx;
memset(&ctx, 0, sizeof(ctx));
cx_sha256_init(&ctx);
cx_hash_no_throw(&ctx.header, CX_LAST, data, data_len, hash, sizeof(hash));

if (cx_hash_no_throw(&ctx.header, CX_LAST, data, data_len, hash, sizeof(hash)) != CX_OK) {
return parser_unexpected_error;
}
#else
picohash_ctx_t ctx;
picohash_init_sha256(&ctx);
Expand Down

0 comments on commit 8e46236

Please sign in to comment.