Fix stm32.c type warnings

This commit is contained in:
David Garske
2025-11-18 14:33:11 -08:00
parent 10c5baec1a
commit 64c03fa9ee
2 changed files with 4 additions and 2 deletions

View File

@@ -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);

View File

@@ -30,6 +30,8 @@
#ifdef STM32_HASH
#include <stdint.h> /* for uint32_t */
#define WOLFSSL_NO_HASH_RAW
#ifdef HASH_DIGEST