소스 검색

secure_element: Update esp-cryptoauthlib submodule latest version.
*This updates the cryptoauthlib version in the esp-cryptoauthlib to cryptoauthlib-v3.3.1

Aditya Patwardhan 4 년 전
부모
커밋
1abdfee3b7

+ 6 - 4
components/esp-tls/esp_tls_mbedtls.c

@@ -39,7 +39,7 @@
 #include "mbedtls/atca_mbedtls_wrap.h"
 #include "tng_atca.h"
 #include "cryptoauthlib.h"
-static const atcacert_def_t* cert_def = NULL;
+static const atcacert_def_t *cert_def = NULL;
 /* Prototypes for functions */
 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 */
@@ -669,9 +669,9 @@ void esp_mbedtls_free_global_ca_store(void)
 }
 
 #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);
     if(ret != 0) {
         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)
 {
     int ret = 0;
-    int esp_ret = ESP_FAIL;
+    esp_err_t esp_ret = ESP_FAIL;
     ESP_LOGI(TAG, "Initialize the ATECC interface...");
+    (void)esp_ret;
+    (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);

+ 1 - 1
examples/peripherals/secure_element/atecc608_ecdsa/components/esp-cryptoauthlib

@@ -1 +1 @@
-Subproject commit c3d3a69021cfec3236ca2c0b63be4048ec6643a4
+Subproject commit bb672b0437485fc7420add178299631692b15ac3

+ 2 - 2
examples/peripherals/secure_element/atecc608_ecdsa/main/ecdsa_example_main.c

@@ -179,10 +179,10 @@ void app_main(void)
     ret = configure_mbedtls_rng();
 #ifdef CONFIG_ATECC608A_TNG
     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 */
     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 */
     ESP_LOGI(TAG, "  . Initialize the ATECC interface for TrustCustom ...");
     /* Default slave address is same as that of TCUSTOM ATECC608A chips */