mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 10:47:28 +02:00
Fixes for STM32 PKA compiler warnings.
This commit is contained in:
@ -6796,6 +6796,8 @@ int wc_ecc_verify_hash(const byte* sig, word32 siglen, const byte* hash,
|
|||||||
}
|
}
|
||||||
#endif /* !NO_ASN */
|
#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)
|
static int wc_ecc_check_r_s_range(ecc_key* key, mp_int* r, mp_int* s)
|
||||||
{
|
{
|
||||||
int err;
|
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();
|
FREE_CURVE_SPECS();
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
#endif /* !WOLFSSL_STM32_PKA && !WOLFSSL_PSOC6_CRYPTO */
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Verify an ECC signature
|
Verify an ECC signature
|
||||||
|
@ -538,7 +538,6 @@ static const uint8_t stm32_ecc256_order[ECC256_KEYSIZE] = {
|
|||||||
0xbc, 0xe6, 0xfa, 0xad, 0xa7, 0x17, 0x9e, 0x84,
|
0xbc, 0xe6, 0xfa, 0xad, 0xa7, 0x17, 0x9e, 0x84,
|
||||||
0xf3, 0xb9, 0xca, 0xc2, 0xfc, 0x63, 0x25, 0x51
|
0xf3, 0xb9, 0xca, 0xc2, 0xfc, 0x63, 0x25, 0x51
|
||||||
};
|
};
|
||||||
static const uint32_t stm32_ecc256_cofactor = 1U;
|
|
||||||
|
|
||||||
#endif /* ECC256 */
|
#endif /* ECC256 */
|
||||||
|
|
||||||
|
@ -1964,7 +1964,7 @@ int wc_GenerateSeed(OS_Seed* os, byte* output, word32 sz)
|
|||||||
((wolfssl_word)&output[i] % sizeof(word32)) != 0
|
((wolfssl_word)&output[i] % sizeof(word32)) != 0
|
||||||
) {
|
) {
|
||||||
/* Single byte at a time */
|
/* Single byte at a time */
|
||||||
word32 tmpRng = 0;
|
uint32_t tmpRng = 0;
|
||||||
if (HAL_RNG_GenerateRandomNumber(&hrng, &tmpRng) != HAL_OK) {
|
if (HAL_RNG_GenerateRandomNumber(&hrng, &tmpRng) != HAL_OK) {
|
||||||
wolfSSL_CryptHwMutexUnLock();
|
wolfSSL_CryptHwMutexUnLock();
|
||||||
return RAN_BLOCK_E;
|
return RAN_BLOCK_E;
|
||||||
@ -1973,7 +1973,7 @@ int wc_GenerateSeed(OS_Seed* os, byte* output, word32 sz)
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* Use native 32 instruction */
|
/* 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();
|
wolfSSL_CryptHwMutexUnLock();
|
||||||
return RAN_BLOCK_E;
|
return RAN_BLOCK_E;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user