mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 18:57:19 +02:00
Merge branch 'fix/menuconfig_option_esp_cryptoauthlib_v4.3' into 'release/v4.3'
esp_tls_mbedtls.c: Fix esp-idf integration of esp-cryptoauthlib (v4.3) See merge request espressif/esp-idf!18401
This commit is contained in:
@ -31,10 +31,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_ESP_TLS_USE_SECURE_ELEMENT
|
#ifdef CONFIG_ESP_TLS_USE_SECURE_ELEMENT
|
||||||
|
|
||||||
#define ATECC608A_TNG_SLAVE_ADDR 0x6A
|
|
||||||
#define ATECC608A_TFLEX_SLAVE_ADDR 0x6C
|
|
||||||
#define ATECC608A_TCUSTOM_SLAVE_ADDR 0xC0
|
|
||||||
/* cryptoauthlib includes */
|
/* cryptoauthlib includes */
|
||||||
#include "mbedtls/atca_mbedtls_wrap.h"
|
#include "mbedtls/atca_mbedtls_wrap.h"
|
||||||
#include "tng_atca.h"
|
#include "tng_atca.h"
|
||||||
@ -689,12 +685,12 @@ static esp_err_t esp_set_atecc608a_pki_context(esp_tls_t *tls, esp_tls_cfg_t *cf
|
|||||||
(void)cert_def;
|
(void)cert_def;
|
||||||
#if defined(CONFIG_ATECC608A_TNG) || defined(CONFIG_ATECC608A_TFLEX)
|
#if defined(CONFIG_ATECC608A_TNG) || defined(CONFIG_ATECC608A_TFLEX)
|
||||||
#ifdef CONFIG_ATECC608A_TNG
|
#ifdef CONFIG_ATECC608A_TNG
|
||||||
esp_ret = esp_init_atecc608a(ATECC608A_TNG_SLAVE_ADDR);
|
esp_ret = esp_init_atecc608a(CONFIG_ATCA_I2C_ADDRESS);
|
||||||
if (ret != ESP_OK) {
|
if (ret != ESP_OK) {
|
||||||
return ESP_ERR_ESP_TLS_SE_FAILED;
|
return ESP_ERR_ESP_TLS_SE_FAILED;
|
||||||
}
|
}
|
||||||
#elif CONFIG_ATECC608A_TFLEX /* CONFIG_ATECC608A_TNG */
|
#elif CONFIG_ATECC608A_TFLEX /* CONFIG_ATECC608A_TNG */
|
||||||
esp_ret = esp_init_atecc608a(ATECC608A_TFLEX_SLAVE_ADDR);
|
esp_ret = esp_init_atecc608a(CONFIG_ATCA_I2C_ADDRESS);
|
||||||
if (ret != ESP_OK) {
|
if (ret != ESP_OK) {
|
||||||
return ESP_ERR_ESP_TLS_SE_FAILED;
|
return ESP_ERR_ESP_TLS_SE_FAILED;
|
||||||
}
|
}
|
||||||
@ -713,7 +709,7 @@ static esp_err_t esp_set_atecc608a_pki_context(esp_tls_t *tls, esp_tls_cfg_t *cf
|
|||||||
return ESP_ERR_ESP_TLS_SE_FAILED;
|
return ESP_ERR_ESP_TLS_SE_FAILED;
|
||||||
}
|
}
|
||||||
#elif CONFIG_ATECC608A_TCUSTOM
|
#elif CONFIG_ATECC608A_TCUSTOM
|
||||||
esp_ret = esp_init_atecc608a(ATECC608A_TCUSTOM_SLAVE_ADDR);
|
esp_ret = esp_init_atecc608a(CONFIG_ATCA_I2C_ADDRESS);
|
||||||
if (ret != ESP_OK) {
|
if (ret != ESP_OK) {
|
||||||
return ESP_ERR_ESP_TLS_SE_FAILED;
|
return ESP_ERR_ESP_TLS_SE_FAILED;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user