Merge branch 'feature/upgrade_mbedtls_to_v4.0' into 'release/v4.0'
mbedtls: upgrade to release v2.16.5 (v4.0) See merge request espressif/esp-idf!7987
This commit is contained in:
commit
921e56d0c3
|
@ -1 +1 @@
|
||||||
Subproject commit f5f2e5926cd294ae7cb579ff6a12ad9303caeb6e
|
Subproject commit 9ef92c551eb8d92677034c3ec8078a8076febf41
|
|
@ -270,7 +270,7 @@ struct crypto_ec *crypto_ec_init(int group)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
mbedtls_ecp_group_init( &e->group );
|
mbedtls_ecp_group_init(&e->group);
|
||||||
|
|
||||||
if (mbedtls_ecp_group_load(&e->group, grp_id)) {
|
if (mbedtls_ecp_group_load(&e->group, grp_id)) {
|
||||||
crypto_ec_deinit(e);
|
crypto_ec_deinit(e);
|
||||||
|
@ -287,7 +287,7 @@ void crypto_ec_deinit(struct crypto_ec *e)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
mbedtls_ecp_group_free( &e->group );
|
mbedtls_ecp_group_free(&e->group);
|
||||||
os_free(e);
|
os_free(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -421,6 +421,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));
|
||||||
|
@ -432,8 +433,8 @@ int crypto_ec_point_mul(struct crypto_ec *e, const struct crypto_ec_point *p,
|
||||||
mbedtls_ctr_drbg_random,
|
mbedtls_ctr_drbg_random,
|
||||||
&ctr_drbg));
|
&ctr_drbg));
|
||||||
cleanup:
|
cleanup:
|
||||||
mbedtls_ctr_drbg_free( &ctr_drbg );
|
mbedtls_ctr_drbg_free(&ctr_drbg);
|
||||||
mbedtls_entropy_free( &entropy );
|
mbedtls_entropy_free(&entropy);
|
||||||
return ret ? -1 : 0;
|
return ret ? -1 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue