Merge branch 'feat/update_mbedtls_3.6.3_v5.2' into 'release/v5.2'

feat(component/mbedtls): update to upstream v3.6.3 (v5.2)

See merge request espressif/esp-idf!38180
This commit is contained in:
Mahavir Jain
2025-04-16 11:14:19 +08:00
6 changed files with 27 additions and 3 deletions

View File

@ -706,6 +706,8 @@ esp_err_t set_client_config(const char *hostname, size_t hostlen, esp_tls_cfg_t
return ESP_ERR_MBEDTLS_SSL_SET_HOSTNAME_FAILED;
}
free(use_host);
} else {
mbedtls_ssl_set_hostname(&tls->ssl, NULL);
}
if ((ret = mbedtls_ssl_config_defaults(&tls->conf,

View File

@ -1215,4 +1215,11 @@ menu "mbedTLS"
which is added through vfs component for ESP32 based targets or by
the host system when the target is Linux.
config MBEDTLS_ALLOW_WEAK_CERTIFICATE_VERIFICATION
bool "Allow weak certificate verification"
default n
help
This options allows weak certificate verification by skipping the hostname verification.
It is not recommended to use this option.
endmenu # mbedTLS

View File

@ -2084,6 +2084,21 @@
#undef MBEDTLS_ERROR_C
#endif
/**
* \def MBEDTLS_SSL_CLI_ALLOW_WEAK_CERTIFICATE_VERIFICATION_WITHOUT_HOSTNAME
*
* Caller: library/ssl_tls.c
*
* Allow weak certificate verification without a hostname.
* This option is not recommended for production use.
*/
#if CONFIG_MBEDTLS_ALLOW_WEAK_CERTIFICATE_VERIFICATION
#define MBEDTLS_SSL_CLI_ALLOW_WEAK_CERTIFICATE_VERIFICATION_WITHOUT_HOSTNAME
#else
#undef MBEDTLS_SSL_CLI_ALLOW_WEAK_CERTIFICATE_VERIFICATION_WITHOUT_HOSTNAME
#endif
/**
* \def MBEDTLS_GCM_C
*

View File

@ -118,5 +118,5 @@ Reducing Binary Size
Under ``Component Config -> mbedTLS``, there are multiple Mbed TLS features which are enabled by default but can be disabled if not needed to save code size. More information can be about this can be found in :ref:`Minimizing Binary Size <minimizing_binary_mbedtls>` docs.
.. _`API Reference`: https://mbed-tls.readthedocs.io/projects/api/en/v3.6.2/
.. _`API Reference`: https://mbed-tls.readthedocs.io/projects/api/en/v3.6.3/
.. _`Knowledge Base`: https://mbed-tls.readthedocs.io/en/latest/kb/

View File

@ -118,5 +118,5 @@ ESP-IDF 中的示例使用 :doc:`/api-reference/protocols/esp_tls`,为访问
``Component Config -> mbedTLS`` 中,有多个 Mbed TLS 功能默认为启用状态。如果不需要这些功能,可将其禁用以减小固件大小。要了解更多信息,请参考 :ref:`Minimizing Binary Size <minimizing_binary_mbedtls>` 文档。
.. _`API Reference`: https://mbed-tls.readthedocs.io/projects/api/en/v3.6.2/
.. _`API Reference`: https://mbed-tls.readthedocs.io/projects/api/en/v3.6.3/
.. _`Knowledge Base`: https://mbed-tls.readthedocs.io/en/latest/kb/