Fix getting key size in stm32_ecc_sign_hash_ex.

This commit is contained in:
Kareem
2023-04-26 15:00:59 -07:00
parent ccb9bdd903
commit e7e2713bba

View File

@@ -1012,7 +1012,7 @@ int stm32_ecc_sign_hash_ex(const byte* hash, word32 hashlen, WC_RNG* rng,
mp_init(&gen_k); mp_init(&gen_k);
mp_init(&order_mp); 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); status = stm32_get_from_mp_int(Keybin, &key->k, size);
if (status != MP_OKAY) if (status != MP_OKAY)