Skip to content

Commit 43a7248

Browse files
Merge branch 'contrib/github_pr_14785' into 'master'
Removed dependency on esp32 to use secure element (GitHub PR) Closes IDFGH-13955 and IDFGH-13922 See merge request espressif/esp-idf!36935
2 parents d6aff6d + 486f3cd commit 43a7248

File tree

5 files changed

+29
-33
lines changed

5 files changed

+29
-33
lines changed

components/esp-tls/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ menu "ESP-TLS"
1515

1616
config ESP_TLS_USE_SECURE_ELEMENT
1717
bool "Use Secure Element (ATECC608A) with ESP-TLS"
18-
depends on IDF_TARGET_ESP32 && ESP_TLS_USING_MBEDTLS
18+
depends on ESP_TLS_USING_MBEDTLS
1919
select ATCA_MBEDTLS_ECDSA
2020
select ATCA_MBEDTLS_ECDSA_SIGN
2121
select ATCA_MBEDTLS_ECDSA_VERIFY

components/tcp_transport/include/esp_transport_ssl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ void esp_transport_ssl_set_common_name(esp_transport_handle_t t, const char *com
166166
/**
167167
* @brief Set the ssl context to use secure element (atecc608a) for client(device) private key and certificate
168168
*
169-
* @note Recommended to be used with ESP32 interfaced to ATECC608A based secure element
169+
* @note Recommended to be used with ESP32 series interfaced to ATECC608A based secure element
170170
*
171171
* @param t ssl transport
172172
*/

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

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,17 @@ Persistent connection means that the HTTP client can reuse the same connection f
3232

3333
To allow ESP HTTP client to take full advantage of persistent connections, one should make as many requests as possible using the same handle instance. Check out the example functions ``http_rest_with_url`` and ``http_rest_with_hostname_path`` in the application example. Here, once the connection is created, multiple requests (``GET``, ``POST``, ``PUT``, etc.) are made before the connection is closed.
3434

35-
.. only:: esp32
35+
Use Secure Element (ATECC608) for TLS
36+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3637

37-
Use Secure Element (ATECC608) for TLS
38-
_____________________________________
38+
A secure element (ATECC608) can be also used for the underlying TLS connection in the HTTP client connection. Please refer to the **ATECC608A (Secure Element) with ESP-TLS** section in the :doc:`ESP-TLS documentation </api-reference/protocols/esp_tls>` for more details. The secure element support has to be first enabled in menuconfig through :ref:`CONFIG_ESP_TLS_USE_SECURE_ELEMENT`. Then the HTTP client can be configured to use secure element as follows:
3939

40-
A secure element (ATECC608) can be also used for the underlying TLS connection in the HTTP client connection. Please refer to the **ATECC608A (Secure Element) with ESP-TLS** section in the :doc:`ESP-TLS documentation </api-reference/protocols/esp_tls>` for more details. The secure element support has to be first enabled in menuconfig through :ref:`CONFIG_ESP_TLS_USE_SECURE_ELEMENT`. Then the HTTP client can be configured to use secure element as follows:
40+
.. code-block:: c
4141
42-
.. code-block:: c
43-
44-
esp_http_client_config_t cfg = {
45-
/* other configurations options */
46-
.use_secure_element = true,
47-
};
42+
esp_http_client_config_t cfg = {
43+
/* other configurations options */
44+
.use_secure_element = true,
45+
};
4846
4947
5048
HTTPS Request

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

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -138,39 +138,37 @@ The following table shows a typical comparison between WolfSSL and MbedTLS when
138138

139139
These values can vary based on configuration options and version of respective libraries.
140140

141-
.. only:: esp32
141+
ATECC608A (Secure Element) with ESP-TLS
142+
--------------------------------------------------
142143

143-
ATECC608A (Secure Element) with ESP-TLS
144-
--------------------------------------------------
144+
ESP-TLS provides support for using ATECC608A cryptoauth chip with ESP32 series of SoCs. The use of ATECC608A is supported only when ESP-TLS is used with MbedTLS as its underlying SSL/TLS stack. ESP-TLS uses MbedTLS as its underlying TLS/SSL stack by default unless changed manually.
145145

146-
ESP-TLS provides support for using ATECC608A cryptoauth chip with ESP32 series of SoCs. The use of ATECC608A is supported only when ESP-TLS is used with MbedTLS as its underlying SSL/TLS stack. ESP-TLS uses MbedTLS as its underlying TLS/SSL stack by default unless changed manually.
147-
148-
.. note::
146+
.. note::
149147

150-
ATECC608A chip interfaced to ESP32 must be already configured. For details, please refer to `esp_cryptoauth_utility <https://github.com/espressif/esp-cryptoauthlib/blob/master/esp_cryptoauth_utility/README.md#esp_cryptoauth_utility>`_.
148+
ATECC608A chip interfaced to ESP32 series must be already configured. For details, please refer to `esp_cryptoauth_utility <https://github.com/espressif/esp-cryptoauthlib/blob/master/esp_cryptoauth_utility/README.md#esp_cryptoauth_utility>`_.
151149

152-
To enable the secure element support, and use it in your project for TLS connection, you have to follow the below steps:
150+
To enable the secure element support, and use it in your project for TLS connection, you have to follow the below steps:
153151

154-
1) Add `esp-cryptoauthlib <https://github.com/espressif/esp-cryptoauthlib>`_ in your project, for details please refer `how to use esp-cryptoauthlib with ESP-IDF <https://github.com/espressif/esp-cryptoauthlib#how-to-use-esp-cryptoauthlib-with-esp-idf>`_.
152+
1) Add `esp-cryptoauthlib <https://github.com/espressif/esp-cryptoauthlib>`_ in your project, for details please refer `how to use esp-cryptoauthlib with ESP-IDF <https://github.com/espressif/esp-cryptoauthlib#how-to-use-esp-cryptoauthlib-with-esp-idf>`_.
155153

156-
2) Enable the following menuconfig option::
154+
2) Enable the following menuconfig option::
157155

158-
menuconfig > Component config > ESP-TLS > Use Secure Element (ATECC608A) with ESP-TLS
156+
menuconfig > Component config > ESP-TLS > Use Secure Element (ATECC608A) with ESP-TLS
159157

160-
3) Select type of ATECC608A chip with following option::
158+
3) Select type of ATECC608A chip with following option::
161159

162-
menuconfig > Component config > esp-cryptoauthlib > Choose Type of ATECC608A chip
160+
menuconfig > Component config > esp-cryptoauthlib > Choose Type of ATECC608A chip
163161

164-
To know more about different types of ATECC608A chips and how to obtain the type of ATECC608A connected to your ESP module, please visit `ATECC608A chip type <https://github.com/espressif/esp-cryptoauthlib/blob/master/esp_cryptoauth_utility/README.md#find-type-of-atecc608a-chip-connected-to-esp32-wroom32-se>`_.
162+
To know more about different types of ATECC608A chips and how to obtain the type of ATECC608A connected to your ESP module, please visit `ATECC608A chip type <https://github.com/espressif/esp-cryptoauthlib/blob/master/esp_cryptoauth_utility/README.md#find-type-of-atecc608a-chip-connected-to-esp32-wroom32-se>`_.
165163

166-
4) Enable the use of ATECC608A in ESP-TLS by providing the following config option in :cpp:type:`esp_tls_cfg_t`.
164+
4) Enable the use of ATECC608A in ESP-TLS by providing the following config option in :cpp:type:`esp_tls_cfg_t`.
167165

168-
.. code-block:: c
166+
.. code-block:: c
169167
170-
esp_tls_cfg_t cfg = {
171-
/* other configurations options */
172-
.use_secure_element = true,
173-
};
168+
esp_tls_cfg_t cfg = {
169+
/* other configurations options */
170+
.use_secure_element = true,
171+
};
174172
175173
.. only:: SOC_DIG_SIGN_SUPPORTED
176174

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ It is possible to set authentication parameters through the :cpp:class:`authenti
154154

155155
* :cpp:member:`password <esp_mqtt_client_config_t::credentials_t::authentication_t::password>`: use a password by setting
156156
* :cpp:member:`certificate <esp_mqtt_client_config_t::credentials_t::authentication_t::certificate>` and :cpp:member:`key <esp_mqtt_client_config_t::credentials_t::authentication_t::key>`: mutual authentication with TLS, and both can be provided in PEM or DER format
157-
* :cpp:member:`use_secure_element <esp_mqtt_client_config_t::credentials_t::authentication_t::use_secure_element>`: use secure element (ATECC608A) interfaced to ESP32
157+
* :cpp:member:`use_secure_element <esp_mqtt_client_config_t::credentials_t::authentication_t::use_secure_element>`: use secure element (ATECC608A) interfaced to ESP32 series
158158
* :cpp:member:`ds_data <esp_mqtt_client_config_t::credentials_t::authentication_t::ds_data>`: use Digital Signature Peripheral available in some Espressif devices
159159

160160
Session

0 commit comments

Comments
 (0)