You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: components/esp-tls/esp_tls.h
+20-2Lines changed: 20 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -96,6 +96,16 @@ typedef enum {
96
96
ESP_TLS_DYN_BUF_STRATEGY_MAX, /*!< to indicate max */
97
97
} esp_tls_dyn_buf_strategy_t;
98
98
99
+
/**
100
+
* @brief ECDSA curve options for TLS connections
101
+
*/
102
+
typedefenum {
103
+
ESP_TLS_ECDSA_CURVE_SECP256R1=0, /*!< Use SECP256R1 curve */
104
+
#ifSOC_ECDSA_SUPPORT_CURVE_P384
105
+
ESP_TLS_ECDSA_CURVE_SECP384R1, /*!< Use SECP384R1 curve */
106
+
#endif
107
+
ESP_TLS_ECDSA_CURVE_MAX, /*!< to indicate max */
108
+
} esp_tls_ecdsa_curve_t;
99
109
100
110
/**
101
111
* @brief ESP-TLS configuration parameters
@@ -169,7 +179,11 @@ typedef struct esp_tls_cfg {
169
179
170
180
booluse_ecdsa_peripheral; /*!< Use the ECDSA peripheral for the private key operations */
171
181
172
-
uint8_tecdsa_key_efuse_blk; /*!< The efuse block where the ECDSA key is stored */
182
+
uint8_tecdsa_key_efuse_blk; /*!< The efuse block where ECDSA key is stored. For SECP384R1 curve, if two blocks are used, set this to the low block and use ecdsa_key_efuse_blk_high for the high block. */
183
+
184
+
uint8_tecdsa_key_efuse_blk_high; /*!< The high efuse block for ECDSA key (used only for SECP384R1 curve). If not set (0), only ecdsa_key_efuse_blk is used. */
185
+
186
+
esp_tls_ecdsa_curve_tecdsa_curve; /*!< ECDSA curve to use (SECP256R1 or SECP384R1) */
173
187
174
188
boolnon_block; /*!< Configure non-blocking mode. If set to true the
booluse_ecdsa_peripheral; /*!< Use ECDSA peripheral to use private key */
315
329
316
-
uint8_tecdsa_key_efuse_blk; /*!< The efuse block where ECDSA key is stored */
330
+
uint8_tecdsa_key_efuse_blk; /*!< The efuse block where ECDSA key is stored. For SECP384R1 curve, if two blocks are used, set this to the low block and use ecdsa_key_efuse_blk_high for the high block. */
331
+
332
+
uint8_tecdsa_key_efuse_blk_high; /*!< The high efuse block for ECDSA key (used only for SECP384R1 curve). If not set (0), only ecdsa_key_efuse_blk is used. */
333
+
334
+
esp_tls_ecdsa_curve_tecdsa_curve; /*!< ECDSA curve to use (SECP256R1 or SECP384R1) */
317
335
318
336
booluse_secure_element; /*!< Enable this option to use secure element or
ESP_STATIC_ASSERT((int)ESP_HTTP_CLIENT_TLS_VER_MAX <= (int)ESP_TLS_VER_TLS_MAX, "HTTP client supported TLS is not supported in esp-tls");
37
37
ESP_STATIC_ASSERT((int)HTTP_TLS_DYN_BUF_RX_STATIC== (int)ESP_TLS_DYN_BUF_RX_STATIC, "Enum mismatch in esp_http_client and esp-tls");
38
38
ESP_STATIC_ASSERT((int)HTTP_TLS_DYN_BUF_STRATEGY_MAX <= (int)ESP_TLS_DYN_BUF_STRATEGY_MAX, "HTTP client supported TLS is not supported in esp-tls");
39
+
ESP_STATIC_ASSERT((int)ESP_HTTP_CLIENT_ECDSA_CURVE_MAX <= (int)ESP_TLS_ECDSA_CURVE_MAX, "HTTP client supported ECDSA curve is not supported in esp-tls");
ESP_HTTP_CLIENT_ECDSA_CURVE_SECP256R1=0, /*!< Use SECP256R1 curve */
103
+
#ifSOC_ECDSA_SUPPORT_CURVE_P384
104
+
ESP_HTTP_CLIENT_ECDSA_CURVE_SECP384R1, /*!< Use SECP384R1 curve */
105
+
#endif
106
+
ESP_HTTP_CLIENT_ECDSA_CURVE_MAX, /*!< to indicate max */
107
+
} esp_http_client_ecdsa_curve_t;
108
+
98
109
/**
99
110
* @brief HTTP method
100
111
*/
@@ -176,7 +187,9 @@ typedef struct {
176
187
esp_http_client_proto_ver_ttls_version; /*!< TLS protocol version of the connection, e.g., TLS 1.2, TLS 1.3 (default - no preference) */
177
188
#ifdefCONFIG_MBEDTLS_HARDWARE_ECDSA_SIGN
178
189
booluse_ecdsa_peripheral; /*!< Use ECDSA peripheral to use private key. */
179
-
uint8_tecdsa_key_efuse_blk; /*!< The efuse block where ECDSA key is stored. */
190
+
uint8_tecdsa_key_efuse_blk; /*!< The efuse block where ECDSA key is stored. For SECP384R1 curve, if two blocks are used, set this to the low block and use ecdsa_key_efuse_blk_high for the high block. */
191
+
uint8_tecdsa_key_efuse_blk_high; /*!< The high efuse block for ECDSA key (used only for SECP384R1 curve). If not set (0), only ecdsa_key_efuse_blk is used. */
192
+
esp_http_client_ecdsa_curve_tecdsa_curve; /*!< ECDSA curve to use (SECP256R1 or SECP384R1) */
180
193
#endif
181
194
constchar*user_agent; /*!< The User Agent string to send with HTTP requests */
Copy file name to clipboardExpand all lines: components/esp_https_server/include/esp_https_server.h
+10-2Lines changed: 10 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
/*
2
-
* SPDX-FileCopyrightText: 2018-2023 Espressif Systems (Shanghai) CO LTD
2
+
* SPDX-FileCopyrightText: 2018-2025 Espressif Systems (Shanghai) CO LTD
3
3
*
4
4
* SPDX-License-Identifier: Apache-2.0
5
5
*/
@@ -100,9 +100,15 @@ struct httpd_ssl_config {
100
100
/** Use ECDSA peripheral to use private key */
101
101
booluse_ecdsa_peripheral;
102
102
103
-
/** The efuse block where ECDSA key is stored */
103
+
/** The efuse block where ECDSA key is stored. For SECP384R1 curve, if two blocks are used, set this to the low block and use ecdsa_key_efuse_blk_high for the high block. */
104
104
uint8_tecdsa_key_efuse_blk;
105
105
106
+
/** The high efuse block for ECDSA key (used only for SECP384R1 curve). If not set (0), only ecdsa_key_efuse_blk is used. */
107
+
uint8_tecdsa_key_efuse_blk_high;
108
+
109
+
/** ECDSA curve to use (SECP256R1 or SECP384R1) */
Copy file name to clipboardExpand all lines: components/hal/include/hal/ecdsa_hal.h
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ typedef struct {
40
40
ecdsa_mode_tmode; /* Mode of operation */
41
41
ecdsa_curve_tcurve; /* Curve to use for operation */
42
42
ecdsa_sha_mode_tsha_mode; /* Source of SHA that needs to be signed */
43
-
intefuse_key_blk; /* Efuse block to use as ECDSA key (The purpose of the efuse block must be ECDSA_KEY) */
43
+
intefuse_key_blk; /*!< The efuse block where ECDSA key is stored. If two blocks are used to store the key, then the macro HAL_ECDSA_COMBINE_KEY_BLOCKS() can be used to combine them. The macro is defined in hal/ecdsa_types.h */
44
44
booluse_km_key; /* Use an ECDSA key from the Key Manager peripheral */
45
45
ecdsa_sign_type_tsign_type; /* Type of signature generation */
46
46
uint16_tloop_number; /* Determines the loop number value in deterministic derivation algorithm to derive K.
0 commit comments