From 987ebc4dbbfb6b9f88c55f23bfdc8bab736b2735 Mon Sep 17 00:00:00 2001 From: Francois Beutin Date: Wed, 12 Oct 2022 18:55:26 +0200 Subject: [PATCH] Align max path length with sdk value --- src/utils.c | 4 ++-- src/utils.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/utils.c b/src/utils.c index 405cb45e..6f0fa0ce 100644 --- a/src/utils.c +++ b/src/utils.c @@ -41,7 +41,7 @@ static void get_private_key(cx_ecfp_private_key_t *privateKey, static void get_private_key_with_seed(cx_ecfp_private_key_t *privateKey, const uint32_t *derivationPath, - uint8_t pathLength) { + size_t pathLength) { uint8_t privateKeyData[PRIVATEKEY_LENGTH]; BEGIN_TRY { TRY { @@ -97,7 +97,7 @@ void get_public_key(uint8_t *publicKeyArray, const uint32_t *derivationPath, siz int read_derivation_path(const uint8_t *data_buffer, size_t data_size, uint32_t *derivation_path, - uint32_t *derivation_path_length) { + size_t *derivation_path_length) { if (!data_buffer || !derivation_path || !derivation_path_length) { return ApduReplySdkInvalidParameter; } diff --git a/src/utils.h b/src/utils.h index f29f035c..bf1c72a7 100644 --- a/src/utils.h +++ b/src/utils.h @@ -31,7 +31,7 @@ void get_private_key(cx_ecfp_private_key_t *privateKey, void get_private_key_with_seed(cx_ecfp_private_key_t *privateKey, const uint32_t *derivationPath, - uint8_t pathLength); + size_t pathLength); uint8_t set_result_sign_message(void); @@ -53,7 +53,7 @@ uint8_t set_result_sign_message(void); int read_derivation_path(const uint8_t *data_buffer, size_t data_size, uint32_t *derivation_path, - uint32_t *derivation_path_length); + size_t *derivation_path_length); void sendResponse(uint8_t tx, bool approve);