mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'fix/menuconfig_option_esp_cryptoauthlib_v4.4' into 'release/v4.4'
esp_tls_mbedtls.c: Fix esp-idf integration of esp-cryptoauthlib (v4.4) See merge request espressif/esp-idf!18400
This commit is contained in:
commit
a7664ecb27
@ -23,10 +23,6 @@
|
||||
#endif
|
||||
|
||||
#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 */
|
||||
#include "mbedtls/atca_mbedtls_wrap.h"
|
||||
#include "tng_atca.h"
|
||||
@ -841,12 +837,12 @@ static esp_err_t esp_set_atecc608a_pki_context(esp_tls_t *tls, esp_tls_cfg_t *cf
|
||||
(void)cert_def;
|
||||
#if defined(CONFIG_ATECC608A_TNG) || defined(CONFIG_ATECC608A_TFLEX)
|
||||
#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) {
|
||||
return ESP_ERR_ESP_TLS_SE_FAILED;
|
||||
}
|
||||
#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) {
|
||||
return ESP_ERR_ESP_TLS_SE_FAILED;
|
||||
}
|
||||
@ -866,7 +862,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;
|
||||
}
|
||||
#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) {
|
||||
return ESP_ERR_ESP_TLS_SE_FAILED;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user