mirror of
				https://github.com/espressif/esp-idf.git
				synced 2025-11-03 22:08:28 +00:00 
			
		
		
		
	esp_tls_mbedtls.c: Fix esp-idf integration of esp-cryptoauthlib
menuconfig option
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