diff --git a/components/espcoredump/test_apps/main/CMakeLists.txt b/components/espcoredump/test_apps/main/CMakeLists.txt index 8f68824565..ad05701748 100644 --- a/components/espcoredump/test_apps/main/CMakeLists.txt +++ b/components/espcoredump/test_apps/main/CMakeLists.txt @@ -7,5 +7,5 @@ idf_component_register(SRCS ${SRCS} INCLUDE_DIRS "." PRIV_REQUIRES unity PRIV_INCLUDE_DIRS ${priv_includes} - REQUIRES mbedtls espcoredump + REQUIRES espcoredump WHOLE_ARCHIVE) diff --git a/components/espcoredump/test_apps/main/test_sections.c b/components/espcoredump/test_apps/main/test_sections.c index 5a70caa042..a54aab120c 100644 --- a/components/espcoredump/test_apps/main/test_sections.c +++ b/components/espcoredump/test_apps/main/test_sections.c @@ -85,8 +85,13 @@ TEST_CASE("espcoredump SHA256 checksum API", "[espcoredump]") }; // Verify size and version +#if CONFIG_ESP_COREDUMP_CHECKSUM_SHA256 TEST_ASSERT_EQUAL(SHA256_RESULT_LEN, esp_core_dump_checksum_size()); +#endif // CONFIG_ESP_COREDUMP_CHECKSUM_SHA256 + +#if CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF TEST_ASSERT_EQUAL(COREDUMP_VERSION_ELF_SHA256, esp_core_dump_elf_version()); +#endif // CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF // Test both single update and multiple updates with the same input checksum_ctx_t sha_ctx1, sha_ctx2; diff --git a/components/espcoredump/test_apps/sdkconfig.ci.checksum_sha256 b/components/espcoredump/test_apps/sdkconfig.ci.checksum_sha256 index 86c5290f2b..48ffbae9a2 100644 --- a/components/espcoredump/test_apps/sdkconfig.ci.checksum_sha256 +++ b/components/espcoredump/test_apps/sdkconfig.ci.checksum_sha256 @@ -1,2 +1 @@ CONFIG_ESP_COREDUMP_ENABLE_TO_UART=y -CONFIG_ESP_COREDUMP_ENABLE_TO_UART=y diff --git a/components/wpa_supplicant/esp_supplicant/src/crypto/crypto_mbedtls-ec.c b/components/wpa_supplicant/esp_supplicant/src/crypto/crypto_mbedtls-ec.c index 8a6943251c..b5dcd83730 100644 --- a/components/wpa_supplicant/esp_supplicant/src/crypto/crypto_mbedtls-ec.c +++ b/components/wpa_supplicant/esp_supplicant/src/crypto/crypto_mbedtls-ec.c @@ -760,7 +760,7 @@ struct crypto_ec_point *crypto_ec_key_get_public_key(struct crypto_ec_key *key) psa_status_t status; // Export public key in uncompressed format: 0x04 || X || Y - uint8_t pub_key_buf[PSA_EXPORT_PUBLIC_KEY_MAX_SIZE]; + uint8_t pub_key_buf[PSA_KEY_EXPORT_ECC_PUBLIC_KEY_MAX_SIZE(ESP_SUP_MAX_ECC_KEY_SIZE)]; size_t pub_key_len = 0; status = psa_export_public_key(wrapper->key_id, pub_key_buf, sizeof(pub_key_buf), &pub_key_len); @@ -922,6 +922,7 @@ int crypto_ec_key_group(struct crypto_ec_key *key) psa_status_t status = psa_get_key_attributes(wrapper->key_id, &key_attributes); if (status != PSA_SUCCESS) { wpa_printf(MSG_ERROR, "crypto_ec_key_group: psa_get_key_attributes failed: %d", status); + psa_reset_key_attributes(&key_attributes); return -1; }