Skip to content

Commit f3dd701

Browse files
committed
docs: move ecdsa documentation under soc capability for esp_http_client.rst
1 parent 25ffd0f commit f3dd701

File tree

2 files changed

+26
-22
lines changed

2 files changed

+26
-22
lines changed

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

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,20 +44,22 @@ A secure element (ATECC608) can be also used for the underlying TLS connection i
4444
.use_secure_element = true,
4545
};
4646
47-
Use ECDSA Peripheral for TLS
48-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
47+
.. only:: SOC_ECDSA_SUPPORTED
4948

50-
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 </api-reference/protocols/esp_tls>` for more details. The HTTP client can be configured to use ECDSA peripheral as follows:
49+
Use ECDSA Peripheral for TLS
50+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5151

52-
.. code-block:: c
52+
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 </api-reference/protocols/esp_tls>` for more details. The HTTP client can be configured to use ECDSA peripheral as follows:
5353

54-
esp_http_client_config_t cfg = {
55-
/* other configurations options */
56-
.use_ecdsa_peripheral = true,
57-
.ecdsa_key_efuse_blk = 4, // Low eFuse block for ECDSA key
58-
.ecdsa_key_efuse_blk_high = 5, // High eFuse block for ECDSA key (SECP384R1 only)
59-
.ecdsa_curve = ESP_TLS_ECDSA_CURVE_SECP384R1, // set this to ESP_TLS_ECDSA_CURVE_SECP256R1 for SECP256R1 curve
60-
};
54+
.. code-block:: c
55+
56+
esp_http_client_config_t cfg = {
57+
/* other configurations options */
58+
.use_ecdsa_peripheral = true,
59+
.ecdsa_key_efuse_blk = 4, // Low eFuse block for ECDSA key
60+
.ecdsa_key_efuse_blk_high = 5, // High eFuse block for ECDSA key (SECP384R1 only)
61+
.ecdsa_curve = ESP_TLS_ECDSA_CURVE_SECP384R1, // set this to ESP_TLS_ECDSA_CURVE_SECP256R1 for SECP256R1 curve
62+
};
6163
6264
6365
HTTPS Request

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

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,20 +44,22 @@ HTTP 基本请求
4444
.use_secure_element = true,
4545
};
4646
47-
为 TLS 使用 ECDSA 外设
48-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
47+
.. only:: SOC_ECDSA_SUPPORTED
4948

50-
ECDSA 外设可用于 HTTP 客户端连接中的底层 TLS 连接。详细内容请参考 :doc:`ESP-TLS 文档 </api-reference/protocols/esp_tls>` 中的 **ECDSA 外设与 ESP-TLS** 小节。可以按如下方式配置 HTTP 客户端以使用 ECDSA 外设:
49+
为 TLS 使用 ECDSA 外设
50+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5151

52-
.. code-block:: c
52+
ECDSA 外设可用于 HTTP 客户端连接中的底层 TLS 连接。详细内容请参考 :doc:`ESP-TLS 文档 </api-reference/protocols/esp_tls>` 中的 **在 ESP-TLS 中使用 ECDSA 外设** 小节。可以按如下方式配置 HTTP 客户端以使用 ECDSA 外设:
5353

54-
esp_http_client_config_t cfg = {
55-
/* other configurations options */
56-
.use_ecdsa_peripheral = true,
57-
.ecdsa_key_efuse_blk = 4, // ECDSA 密钥的低 eFuse 块
58-
.ecdsa_key_efuse_blk_high = 5, // ECDSA 密钥的高 eFuse 块(仅 SECP384R1)
59-
.ecdsa_curve = ESP_TLS_ECDSA_CURVE_SECP384R1, // 设置为 ESP_TLS_ECDSA_CURVE_SECP256R1 以使用 SECP256R1 曲线
60-
};
54+
.. code-block:: c
55+
56+
esp_http_client_config_t cfg = {
57+
/* other configurations options */
58+
.use_ecdsa_peripheral = true,
59+
.ecdsa_key_efuse_blk = 4, // ECDSA 密钥的低 eFuse 块
60+
.ecdsa_key_efuse_blk_high = 5, // ECDSA 密钥的高 eFuse 块(仅 SECP384R1)
61+
.ecdsa_curve = ESP_TLS_ECDSA_CURVE_SECP384R1, // 设置为 ESP_TLS_ECDSA_CURVE_SECP256R1 以使用 SECP256R1 曲线
62+
};
6163
6264
6365
HTTPS 请求

0 commit comments

Comments
 (0)