mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
wpa_supplicant: Fix SAE test-case failure on mbedtls version udpate
Problem: mbedtls_ctr_drbg_context was initialized in crypto_ec_point_mul. This was okay in releases before 2.16.4 as entropy_len used to get set to MBEDTLS_CTR_DRBG_ENTROPY_LEN in function mbedtls_ctr_drbg_seed. The function is now changed to set the length to MBEDTLS_CTR_DRBG_ENTROPY_LEN if previous length is 0 and hence the bug. Solution: Initialize mbedtls_ctr_drbg_context in crypto_ec_point_mul.
This commit is contained in:
parent
9f024df9e5
commit
5c4f7948d4
@ -417,6 +417,7 @@ int crypto_ec_point_mul(struct crypto_ec *e, const struct crypto_ec_point *p,
|
|||||||
mbedtls_ctr_drbg_context ctr_drbg;
|
mbedtls_ctr_drbg_context ctr_drbg;
|
||||||
|
|
||||||
mbedtls_entropy_init(&entropy);
|
mbedtls_entropy_init(&entropy);
|
||||||
|
mbedtls_ctr_drbg_init(&ctr_drbg);
|
||||||
|
|
||||||
MBEDTLS_MPI_CHK(mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy,
|
MBEDTLS_MPI_CHK(mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy,
|
||||||
NULL, 0));
|
NULL, 0));
|
||||||
|
Loading…
Reference in New Issue
Block a user