Skip to content

Commit 21f59bd

Browse files
committed
Merge branch 'feat/update_mbedtls_3.6.3' into 'master'
feat(component/mbedtls): update to upstream v3.6.3 Closes IDF-12730 See merge request espressif/esp-idf!38041
2 parents bf28df9 + b126ebb commit 21f59bd

File tree

6 files changed

+27
-3
lines changed

6 files changed

+27
-3
lines changed

components/esp-tls/esp_tls_mbedtls.c

+2
Original file line numberDiff line numberDiff line change
@@ -726,6 +726,8 @@ esp_err_t set_client_config(const char *hostname, size_t hostlen, esp_tls_cfg_t
726726
return ESP_ERR_MBEDTLS_SSL_SET_HOSTNAME_FAILED;
727727
}
728728
free(use_host);
729+
} else {
730+
mbedtls_ssl_set_hostname(&tls->ssl, NULL);
729731
}
730732

731733
if ((ret = mbedtls_ssl_config_defaults(&tls->conf,

components/mbedtls/Kconfig

+7
Original file line numberDiff line numberDiff line change
@@ -1273,4 +1273,11 @@ menu "mbedTLS"
12731273
which is added through vfs component for ESP32 based targets or by
12741274
the host system when the target is Linux.
12751275

1276+
config MBEDTLS_ALLOW_WEAK_CERTIFICATE_VERIFICATION
1277+
bool "Allow weak certificate verification"
1278+
default n
1279+
help
1280+
This options allows weak certificate verification by skipping the hostname verification.
1281+
It is not recommended to use this option.
1282+
12761283
endmenu # mbedTLS

components/mbedtls/mbedtls

Submodule mbedtls updated 1197 files

components/mbedtls/port/include/mbedtls/esp_config.h

+15
Original file line numberDiff line numberDiff line change
@@ -2117,6 +2117,21 @@
21172117
#undef MBEDTLS_ERROR_C
21182118
#endif
21192119

2120+
/**
2121+
* \def MBEDTLS_SSL_CLI_ALLOW_WEAK_CERTIFICATE_VERIFICATION_WITHOUT_HOSTNAME
2122+
*
2123+
* Caller: library/ssl_tls.c
2124+
*
2125+
* Allow weak certificate verification without a hostname.
2126+
* This option is not recommended for production use.
2127+
*/
2128+
2129+
#if CONFIG_MBEDTLS_ALLOW_WEAK_CERTIFICATE_VERIFICATION
2130+
#define MBEDTLS_SSL_CLI_ALLOW_WEAK_CERTIFICATE_VERIFICATION_WITHOUT_HOSTNAME
2131+
#else
2132+
#undef MBEDTLS_SSL_CLI_ALLOW_WEAK_CERTIFICATE_VERIFICATION_WITHOUT_HOSTNAME
2133+
#endif
2134+
21202135
/**
21212136
* \def MBEDTLS_GCM_C
21222137
*

docs/en/api-reference/protocols/mbedtls.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,5 +118,5 @@ Reducing Binary Size
118118
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.
119119

120120

121-
.. _`API Reference`: https://mbed-tls.readthedocs.io/projects/api/en/v3.6.2/
121+
.. _`API Reference`: https://mbed-tls.readthedocs.io/projects/api/en/v3.6.3/
122122
.. _`Knowledge Base`: https://mbed-tls.readthedocs.io/en/latest/kb/

docs/zh_CN/api-reference/protocols/mbedtls.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,5 +118,5 @@ ESP-IDF 中的示例使用 :doc:`/api-reference/protocols/esp_tls`,为访问
118118
在 ``Component Config -> mbedTLS`` 中,有多个 Mbed TLS 功能默认为启用状态。如果不需要这些功能,可将其禁用以减小固件大小。要了解更多信息,请参考 :ref:`Minimizing Binary Size <minimizing_binary_mbedtls>` 文档。
119119

120120

121-
.. _`API Reference`: https://mbed-tls.readthedocs.io/projects/api/en/v3.6.2/
121+
.. _`API Reference`: https://mbed-tls.readthedocs.io/projects/api/en/v3.6.3/
122122
.. _`Knowledge Base`: https://mbed-tls.readthedocs.io/en/latest/kb/

0 commit comments

Comments
 (0)