mirror of
				https://github.com/espressif/esp-idf.git
				synced 2025-11-04 06:11:06 +00:00 
			
		
		
		
	Merge branch 'feature/update_esp_cryptoauthlib_v4.3' into 'release/v4.3'
secure_element: Update esp-cryptoauthlib submodule latest version. (v4.3) See merge request espressif/esp-idf!13836
This commit is contained in:
		@@ -39,7 +39,7 @@
 | 
				
			|||||||
#include "mbedtls/atca_mbedtls_wrap.h"
 | 
					#include "mbedtls/atca_mbedtls_wrap.h"
 | 
				
			||||||
#include "tng_atca.h"
 | 
					#include "tng_atca.h"
 | 
				
			||||||
#include "cryptoauthlib.h"
 | 
					#include "cryptoauthlib.h"
 | 
				
			||||||
static const atcacert_def_t* cert_def = NULL;
 | 
					static const atcacert_def_t *cert_def = NULL;
 | 
				
			||||||
/* Prototypes for functions */
 | 
					/* Prototypes for functions */
 | 
				
			||||||
static esp_err_t esp_set_atecc608a_pki_context(esp_tls_t *tls, esp_tls_cfg_t *cfg);
 | 
					static esp_err_t esp_set_atecc608a_pki_context(esp_tls_t *tls, esp_tls_cfg_t *cfg);
 | 
				
			||||||
#endif /* CONFIG_ESP_TLS_USE_SECURE_ELEMENT */
 | 
					#endif /* CONFIG_ESP_TLS_USE_SECURE_ELEMENT */
 | 
				
			||||||
@@ -669,9 +669,9 @@ void esp_mbedtls_free_global_ca_store(void)
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef CONFIG_ESP_TLS_USE_SECURE_ELEMENT
 | 
					#ifdef CONFIG_ESP_TLS_USE_SECURE_ELEMENT
 | 
				
			||||||
static esp_err_t esp_init_atecc608a(uint8_t slave_addr)
 | 
					static esp_err_t esp_init_atecc608a(uint8_t i2c_addr)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    cfg_ateccx08a_i2c_default.atcai2c.slave_address = slave_addr;
 | 
					    cfg_ateccx08a_i2c_default.atcai2c.address = i2c_addr;
 | 
				
			||||||
    int ret = atcab_init(&cfg_ateccx08a_i2c_default);
 | 
					    int ret = atcab_init(&cfg_ateccx08a_i2c_default);
 | 
				
			||||||
    if(ret != 0) {
 | 
					    if(ret != 0) {
 | 
				
			||||||
        ESP_LOGE(TAG, "Failed\n !atcab_init returned %02x", ret);
 | 
					        ESP_LOGE(TAG, "Failed\n !atcab_init returned %02x", ret);
 | 
				
			||||||
@@ -683,8 +683,10 @@ static esp_err_t esp_init_atecc608a(uint8_t slave_addr)
 | 
				
			|||||||
static esp_err_t esp_set_atecc608a_pki_context(esp_tls_t *tls, esp_tls_cfg_t *cfg)
 | 
					static esp_err_t esp_set_atecc608a_pki_context(esp_tls_t *tls, esp_tls_cfg_t *cfg)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    int ret = 0;
 | 
					    int ret = 0;
 | 
				
			||||||
    int esp_ret = ESP_FAIL;
 | 
					    esp_err_t esp_ret = ESP_FAIL;
 | 
				
			||||||
    ESP_LOGI(TAG, "Initialize the ATECC interface...");
 | 
					    ESP_LOGI(TAG, "Initialize the ATECC interface...");
 | 
				
			||||||
 | 
					    (void)esp_ret;
 | 
				
			||||||
 | 
					    (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(ATECC608A_TNG_SLAVE_ADDR);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -179,10 +179,10 @@ void app_main(void)
 | 
				
			|||||||
    ret = configure_mbedtls_rng();
 | 
					    ret = configure_mbedtls_rng();
 | 
				
			||||||
#ifdef CONFIG_ATECC608A_TNG
 | 
					#ifdef CONFIG_ATECC608A_TNG
 | 
				
			||||||
    ESP_LOGI(TAG, "  . Initialize the ATECC interface for Trust & GO ...");
 | 
					    ESP_LOGI(TAG, "  . Initialize the ATECC interface for Trust & GO ...");
 | 
				
			||||||
    cfg_ateccx08a_i2c_default.atcai2c.slave_address = 0x6A;
 | 
					    cfg_ateccx08a_i2c_default.atcai2c.address = 0x6A;
 | 
				
			||||||
#elif CONFIG_ATECC608A_TFLEX /* CONFIG_ATECC608A_TNGO */
 | 
					#elif CONFIG_ATECC608A_TFLEX /* CONFIG_ATECC608A_TNGO */
 | 
				
			||||||
    ESP_LOGI(TAG, "  . Initialize the ATECC interface for TrustFlex ...");
 | 
					    ESP_LOGI(TAG, "  . Initialize the ATECC interface for TrustFlex ...");
 | 
				
			||||||
    cfg_ateccx08a_i2c_default.atcai2c.slave_address = 0x6C;
 | 
					    cfg_ateccx08a_i2c_default.atcai2c.address = 0x6C;
 | 
				
			||||||
#elif CONFIG_ATECC608A_TCUSTOM /* CONFIG_ATECC608A_TFLEX */
 | 
					#elif CONFIG_ATECC608A_TCUSTOM /* CONFIG_ATECC608A_TFLEX */
 | 
				
			||||||
    ESP_LOGI(TAG, "  . Initialize the ATECC interface for TrustCustom ...");
 | 
					    ESP_LOGI(TAG, "  . Initialize the ATECC interface for TrustCustom ...");
 | 
				
			||||||
    /* Default slave address is same as that of TCUSTOM ATECC608A chips */
 | 
					    /* Default slave address is same as that of TCUSTOM ATECC608A chips */
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user