From f3dd701289305fb18b462a61a962e4fe3cde71c6 Mon Sep 17 00:00:00 2001 From: "nilesh.kale" Date: Thu, 25 Sep 2025 12:41:56 +0530 Subject: [PATCH] docs: move ecdsa documentation under soc capability for esp_http_client.rst --- .../protocols/esp_http_client.rst | 24 ++++++++++--------- .../protocols/esp_http_client.rst | 24 ++++++++++--------- 2 files changed, 26 insertions(+), 22 deletions(-) diff --git a/docs/en/api-reference/protocols/esp_http_client.rst b/docs/en/api-reference/protocols/esp_http_client.rst index e463eb95b4..f5dfd49074 100644 --- a/docs/en/api-reference/protocols/esp_http_client.rst +++ b/docs/en/api-reference/protocols/esp_http_client.rst @@ -44,20 +44,22 @@ A secure element (ATECC608) can be also used for the underlying TLS connection i .use_secure_element = true, }; -Use ECDSA Peripheral for TLS -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +.. only:: SOC_ECDSA_SUPPORTED -The ECDSA peripheral can be used for the underlying TLS connection in the HTTP client connection. Please refer to the **ECDSA Peripheral with ESP-TLS** section in the :doc:`ESP-TLS documentation ` for more details. The HTTP client can be configured to use ECDSA peripheral as follows: + Use ECDSA Peripheral for TLS + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -.. code-block:: c + The ECDSA peripheral can be used for the underlying TLS connection in the HTTP client connection. Please refer to the **ECDSA Peripheral with ESP-TLS** section in the :doc:`ESP-TLS documentation ` for more details. The HTTP client can be configured to use ECDSA peripheral as follows: - esp_http_client_config_t cfg = { - /* other configurations options */ - .use_ecdsa_peripheral = true, - .ecdsa_key_efuse_blk = 4, // Low eFuse block for ECDSA key - .ecdsa_key_efuse_blk_high = 5, // High eFuse block for ECDSA key (SECP384R1 only) - .ecdsa_curve = ESP_TLS_ECDSA_CURVE_SECP384R1, // set this to ESP_TLS_ECDSA_CURVE_SECP256R1 for SECP256R1 curve - }; + .. code-block:: c + + esp_http_client_config_t cfg = { + /* other configurations options */ + .use_ecdsa_peripheral = true, + .ecdsa_key_efuse_blk = 4, // Low eFuse block for ECDSA key + .ecdsa_key_efuse_blk_high = 5, // High eFuse block for ECDSA key (SECP384R1 only) + .ecdsa_curve = ESP_TLS_ECDSA_CURVE_SECP384R1, // set this to ESP_TLS_ECDSA_CURVE_SECP256R1 for SECP256R1 curve + }; HTTPS Request diff --git a/docs/zh_CN/api-reference/protocols/esp_http_client.rst b/docs/zh_CN/api-reference/protocols/esp_http_client.rst index 5a6ff5852a..662c395f2b 100644 --- a/docs/zh_CN/api-reference/protocols/esp_http_client.rst +++ b/docs/zh_CN/api-reference/protocols/esp_http_client.rst @@ -44,20 +44,22 @@ HTTP 基本请求 .use_secure_element = true, }; -为 TLS 使用 ECDSA 外设 -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +.. only:: SOC_ECDSA_SUPPORTED -ECDSA 外设可用于 HTTP 客户端连接中的底层 TLS 连接。详细内容请参考 :doc:`ESP-TLS 文档 ` 中的 **ECDSA 外设与 ESP-TLS** 小节。可以按如下方式配置 HTTP 客户端以使用 ECDSA 外设: + 为 TLS 使用 ECDSA 外设 + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -.. code-block:: c + ECDSA 外设可用于 HTTP 客户端连接中的底层 TLS 连接。详细内容请参考 :doc:`ESP-TLS 文档 ` 中的 **在 ESP-TLS 中使用 ECDSA 外设** 小节。可以按如下方式配置 HTTP 客户端以使用 ECDSA 外设: - esp_http_client_config_t cfg = { - /* other configurations options */ - .use_ecdsa_peripheral = true, - .ecdsa_key_efuse_blk = 4, // ECDSA 密钥的低 eFuse 块 - .ecdsa_key_efuse_blk_high = 5, // ECDSA 密钥的高 eFuse 块(仅 SECP384R1) - .ecdsa_curve = ESP_TLS_ECDSA_CURVE_SECP384R1, // 设置为 ESP_TLS_ECDSA_CURVE_SECP256R1 以使用 SECP256R1 曲线 - }; + .. code-block:: c + + esp_http_client_config_t cfg = { + /* other configurations options */ + .use_ecdsa_peripheral = true, + .ecdsa_key_efuse_blk = 4, // ECDSA 密钥的低 eFuse 块 + .ecdsa_key_efuse_blk_high = 5, // ECDSA 密钥的高 eFuse 块(仅 SECP384R1) + .ecdsa_curve = ESP_TLS_ECDSA_CURVE_SECP384R1, // 设置为 ESP_TLS_ECDSA_CURVE_SECP256R1 以使用 SECP256R1 曲线 + }; HTTPS 请求