Skip to content

Commit

Permalink
fix(mbedtls): Build issue in dynamic buffer feature
Browse files Browse the repository at this point in the history
Fix build issue in mbedTLS dynamic buffer feature with
`CONFIG_MBEDTLS_DHM_C` enabled case. Also added a build
configuration for the test coverage.

Closes #11770
  • Loading branch information
mahavirj committed Jun 29, 2023
1 parent cf7e743 commit 9029050
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/mbedtls/port/dynamic/esp_mbedtls_dynamic_impl.c
Original file line number Diff line number Diff line change
Expand Up @@ -474,8 +474,8 @@ void esp_mbedtls_free_dhm(mbedtls_ssl_context *ssl)
{
#ifdef CONFIG_MBEDTLS_DHM_C
const mbedtls_ssl_config *conf = mbedtls_ssl_context_get_config(ssl);
mbedtls_mpi_free((mbedtls_mpi *)conf->MBEDTLS_PRIVATE(dhm_P));
mbedtls_mpi_free((mbedtls_mpi *)conf->MBEDTLS_PRIVATE(dhm_G));
mbedtls_mpi_free((mbedtls_mpi *)&conf->MBEDTLS_PRIVATE(dhm_P));
mbedtls_mpi_free((mbedtls_mpi *)&conf->MBEDTLS_PRIVATE(dhm_G));
#endif /* CONFIG_MBEDTLS_DHM_C */
}

Expand Down
1 change: 1 addition & 0 deletions examples/protocols/esp_http_client/sdkconfig.ci.ssldyn
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ CONFIG_ESP_HTTP_CLIENT_ENABLE_BASIC_AUTH=y
CONFIG_MBEDTLS_DYNAMIC_BUFFER=y
CONFIG_MBEDTLS_DYNAMIC_FREE_PEER_CERT=y
CONFIG_MBEDTLS_DYNAMIC_FREE_CONFIG_DATA=y
CONFIG_MBEDTLS_DHM_C=y
CONFIG_EXAMPLE_HTTP_ENDPOINT="httpbin.espressif.cn"

0 comments on commit 9029050

Please sign in to comment.