Fixes for STM32 PKA compiler warnings.

This commit is contained in:
David Garske
2021-05-25 12:37:12 -07:00
parent 64298a2c4a
commit 839231c508
3 changed files with 6 additions and 3 deletions

View File

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

View File

@ -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 */

View File

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