From e7e2713bba37ecb2ff0a7fc39d820f7b25f44700 Mon Sep 17 00:00:00 2001 From: Kareem Date: Wed, 26 Apr 2023 15:00:59 -0700 Subject: [PATCH] Fix getting key size in stm32_ecc_sign_hash_ex. --- wolfcrypt/src/port/st/stm32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wolfcrypt/src/port/st/stm32.c b/wolfcrypt/src/port/st/stm32.c index c0208127e..f72d1872f 100644 --- a/wolfcrypt/src/port/st/stm32.c +++ b/wolfcrypt/src/port/st/stm32.c @@ -1012,7 +1012,7 @@ int stm32_ecc_sign_hash_ex(const byte* hash, word32 hashlen, WC_RNG* rng, mp_init(&gen_k); mp_init(&order_mp); - size = mp_unsigned_bin_size(key->pubkey.x); + size = wc_ecc_size(key); status = stm32_get_from_mp_int(Keybin, &key->k, size); if (status != MP_OKAY)