diff --git a/wolfcrypt/src/port/st/stm32.c b/wolfcrypt/src/port/st/stm32.c index 419136bc6..c56ddaa17 100644 --- a/wolfcrypt/src/port/st/stm32.c +++ b/wolfcrypt/src/port/st/stm32.c @@ -1034,7 +1034,7 @@ int stm32_ecc_verify_hash_ex(mp_int *r, mp_int *s, const byte* hash, if (hashlen > STM32_MAX_ECC_SIZE) { return ECC_BAD_ARG_E; } - else if (hashlen > size) { + else if ((int)hashlen > size) { /* in the case that hashlen is larger than key size place hash at * beginning of buffer */ XMEMCPY(Hashbin, hash, size); @@ -1141,7 +1141,7 @@ int stm32_ecc_sign_hash_ex(const byte* hash, word32 hashlen, WC_RNG* rng, if (hashlen > STM32_MAX_ECC_SIZE) { return ECC_BAD_ARG_E; } - else if (hashlen > size) { + else if ((int)hashlen > size) { /* in the case that hashlen is larger than key size place hash at * beginning of buffer */ XMEMCPY(Hashbin, hash, size); diff --git a/wolfssl/wolfcrypt/port/st/stm32.h b/wolfssl/wolfcrypt/port/st/stm32.h index 64810f4f1..dbab9200a 100644 --- a/wolfssl/wolfcrypt/port/st/stm32.h +++ b/wolfssl/wolfcrypt/port/st/stm32.h @@ -30,6 +30,8 @@ #ifdef STM32_HASH +#include /* for uint32_t */ + #define WOLFSSL_NO_HASH_RAW #ifdef HASH_DIGEST