mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
refactor(flash_enc): move esp_flash_encryption_enabled() to efuse component
This commit is contained in:
committed by
Chen Ji Chang
parent
0ac402217c
commit
b8c527a87c
@@ -1,6 +1,6 @@
|
||||
idf_component_register(SRC_DIRS "."
|
||||
PRIV_REQUIRES cmock test_utils nvs_flash nvs_sec_provider
|
||||
bootloader_support esp_psram
|
||||
esp_psram efuse
|
||||
EMBED_TXTFILES encryption_keys.bin partition_encrypted.bin
|
||||
partition_encrypted_hmac.bin sample.bin
|
||||
WHOLE_ARCHIVE)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2016-2024 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2016-2026 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Unlicense OR CC0-1.0
|
||||
*/
|
||||
@@ -13,7 +13,7 @@
|
||||
#include <inttypes.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "esp_flash_encrypt.h"
|
||||
#include "esp_efuse.h"
|
||||
#include "esp_log.h"
|
||||
#include "esp_partition.h"
|
||||
#include "esp_system.h"
|
||||
@@ -502,7 +502,7 @@ TEST_CASE("Check nvs key partition APIs (read and generate keys)", "[nvs]")
|
||||
{
|
||||
nvs_sec_cfg_t cfg, cfg2;
|
||||
#if CONFIG_NVS_SEC_KEY_PROTECT_USING_FLASH_ENC
|
||||
if (!esp_flash_encryption_enabled()) {
|
||||
if (!esp_efuse_is_flash_encryption_enabled()) {
|
||||
TEST_IGNORE_MESSAGE("flash encryption disabled, skipping nvs_key partition related tests");
|
||||
}
|
||||
|
||||
@@ -529,7 +529,7 @@ TEST_CASE("Check nvs key partition APIs (read and generate keys)", "[nvs]")
|
||||
TEST_CASE("test nvs apis with encryption enabled", "[nvs]")
|
||||
{
|
||||
#if CONFIG_NVS_SEC_KEY_PROTECT_USING_FLASH_ENC
|
||||
if (!esp_flash_encryption_enabled()) {
|
||||
if (!esp_efuse_is_flash_encryption_enabled()) {
|
||||
TEST_IGNORE_MESSAGE("flash encryption disabled, skipping nvs_api tests with encryption enabled");
|
||||
}
|
||||
const esp_partition_t* key_part = esp_partition_find_first(
|
||||
@@ -653,7 +653,7 @@ TEST_CASE("test nvs apis for nvs partition generator utility with encryption ena
|
||||
extern const char sample_bin_start[] asm("_binary_sample_bin_start");
|
||||
|
||||
#if CONFIG_NVS_SEC_KEY_PROTECT_USING_FLASH_ENC
|
||||
if (!esp_flash_encryption_enabled()) {
|
||||
if (!esp_efuse_is_flash_encryption_enabled()) {
|
||||
TEST_IGNORE_MESSAGE("flash encryption disabled, skipping nvs_api tests with encryption enabled");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user