refactor(app_update): rename SECURE_SIGNED_DATA_PARTITION Kconfig option

This commit is contained in:
Ashish Sharma
2026-08-12 08:39:18 +05:30
committed by Mahavir Jain
parent 8589d9df25
commit b912691fcd
10 changed files with 20 additions and 15 deletions
+2 -1
View File
@@ -1,5 +1,6 @@
menu "App Update config"
config SECURE_SIGNED_DATA_PARTITION
config APP_UPDATE_SECURE_SIGNED_DATA_PARTITION
default n
bool "Require signed Data partition images"
depends on SECURE_SIGNED_ON_UPDATE_NO_SECURE_BOOT || SECURE_SIGNED_APPS
+6 -6
View File
@@ -32,9 +32,9 @@
#include "esp_flash.h"
#include "esp_private/esp_flash_internal.h" //For dangerous write protection
#include "esp_macros.h"
#if CONFIG_SECURE_SIGNED_DATA_PARTITION
#if CONFIG_APP_UPDATE_SECURE_SIGNED_DATA_PARTITION
#include "psa/crypto.h"
#endif // CONFIG_SECURE_SIGNED_DATA_PARTITION
#endif // CONFIG_APP_UPDATE_SECURE_SIGNED_DATA_PARTITION
#define OTA_SLOT(i) (i & 0x0F)
@@ -491,7 +491,7 @@ esp_err_t esp_ota_abort(esp_ota_handle_t handle)
return ESP_OK;
}
#if CONFIG_SECURE_SIGNED_DATA_PARTITION
#if CONFIG_APP_UPDATE_SECURE_SIGNED_DATA_PARTITION
#define SHA_CHUNK 256
static esp_err_t ota_calc_partition_bin_sha(const esp_partition_t *partition, uint32_t length, uint8_t out_digest[ESP_SECURE_BOOT_DIGEST_LEN], psa_algorithm_t alg)
{
@@ -573,7 +573,7 @@ static esp_err_t ota_verify_data_partition_signature(const esp_partition_t *part
}
return err;
}
#endif // CONFIG_SECURE_SIGNED_DATA_PARTITION
#endif // CONFIG_APP_UPDATE_SECURE_SIGNED_DATA_PARTITION
static esp_err_t ota_verify_partition(ota_ops_entry_t *ota_ops)
{
@@ -600,7 +600,7 @@ static esp_err_t ota_verify_partition(ota_ops_entry_t *ota_ops)
esp_partition_munmap(partition_table_map);
}
}
#if CONFIG_SECURE_SIGNED_DATA_PARTITION
#if CONFIG_APP_UPDATE_SECURE_SIGNED_DATA_PARTITION
else if (ota_ops->partition.final->type == ESP_PARTITION_TYPE_DATA &&
ota_ops->partition.final->subtype == ESP_PARTITION_SUBTYPE_DATA_UNDEFINED) {
esp_err_t err = ota_verify_data_partition_signature(ota_ops->partition.staging, ota_ops->wrote_size);
@@ -610,7 +610,7 @@ static esp_err_t ota_verify_partition(ota_ops_entry_t *ota_ops)
}
return ESP_OK;
}
#endif // CONFIG_SECURE_SIGNED_DATA_PARTITION
#endif // CONFIG_APP_UPDATE_SECURE_SIGNED_DATA_PARTITION
return ret;
}
+4
View File
@@ -0,0 +1,4 @@
# sdkconfig replacement configurations for deprecated options formatted as
# CONFIG_DEPRECATED_OPTION CONFIG_NEW_OPTION
CONFIG_SECURE_SIGNED_DATA_PARTITION CONFIG_APP_UPDATE_SECURE_SIGNED_DATA_PARTITION