diff --git a/wolfcrypt/src/ecc.c b/wolfcrypt/src/ecc.c index 5336d15f0..9c40912fc 100644 --- a/wolfcrypt/src/ecc.c +++ b/wolfcrypt/src/ecc.c @@ -6796,6 +6796,8 @@ int wc_ecc_verify_hash(const byte* sig, word32 siglen, const byte* hash, } #endif /* !NO_ASN */ +#if !defined(WOLFSSL_STM32_PKA) && !defined(WOLFSSL_PSOC6_CRYPTO) + static int wc_ecc_check_r_s_range(ecc_key* key, mp_int* r, mp_int* s) { int err; @@ -6822,6 +6824,8 @@ static int wc_ecc_check_r_s_range(ecc_key* key, mp_int* r, mp_int* s) FREE_CURVE_SPECS(); return err; } +#endif /* !WOLFSSL_STM32_PKA && !WOLFSSL_PSOC6_CRYPTO */ + /** Verify an ECC signature diff --git a/wolfcrypt/src/port/st/stm32.c b/wolfcrypt/src/port/st/stm32.c index 390fa23f4..c276a6f6f 100644 --- a/wolfcrypt/src/port/st/stm32.c +++ b/wolfcrypt/src/port/st/stm32.c @@ -538,7 +538,6 @@ static const uint8_t stm32_ecc256_order[ECC256_KEYSIZE] = { 0xbc, 0xe6, 0xfa, 0xad, 0xa7, 0x17, 0x9e, 0x84, 0xf3, 0xb9, 0xca, 0xc2, 0xfc, 0x63, 0x25, 0x51 }; -static const uint32_t stm32_ecc256_cofactor = 1U; #endif /* ECC256 */ diff --git a/wolfcrypt/src/random.c b/wolfcrypt/src/random.c index 0d00cee34..32af3022f 100644 --- a/wolfcrypt/src/random.c +++ b/wolfcrypt/src/random.c @@ -1964,7 +1964,7 @@ int wc_GenerateSeed(OS_Seed* os, byte* output, word32 sz) ((wolfssl_word)&output[i] % sizeof(word32)) != 0 ) { /* Single byte at a time */ - word32 tmpRng = 0; + uint32_t tmpRng = 0; if (HAL_RNG_GenerateRandomNumber(&hrng, &tmpRng) != HAL_OK) { wolfSSL_CryptHwMutexUnLock(); return RAN_BLOCK_E; @@ -1973,7 +1973,7 @@ int wc_GenerateSeed(OS_Seed* os, byte* output, word32 sz) } else { /* Use native 32 instruction */ - if (HAL_RNG_GenerateRandomNumber(&hrng, (word32*)&output[i]) != HAL_OK) { + if (HAL_RNG_GenerateRandomNumber(&hrng, (uint32_t*)&output[i]) != HAL_OK) { wolfSSL_CryptHwMutexUnLock(); return RAN_BLOCK_E; }