kopia lustrzana https://github.com/espressif/esp-idf
Merge branch 'bugfix/issue_with_encryption_flag_for_partition' into 'master'
partition: Fix "encrypted" read/write when encryption is disabled See merge request idf/esp-idf!4927pull/3486/head
commit
073573aa5d
|
@ -168,10 +168,13 @@ static esp_err_t load_partitions()
|
||||||
item->info.type = it->type;
|
item->info.type = it->type;
|
||||||
item->info.subtype = it->subtype;
|
item->info.subtype = it->subtype;
|
||||||
item->info.encrypted = it->flags & PART_FLAG_ENCRYPTED;
|
item->info.encrypted = it->flags & PART_FLAG_ENCRYPTED;
|
||||||
if (esp_flash_encryption_enabled() && (
|
|
||||||
it->type == PART_TYPE_APP
|
if (!esp_flash_encryption_enabled()) {
|
||||||
|
/* If flash encryption is not turned on, no partitions should be treated as encrypted */
|
||||||
|
item->info.encrypted = false;
|
||||||
|
} else if (it->type == PART_TYPE_APP
|
||||||
|| (it->type == PART_TYPE_DATA && it->subtype == PART_SUBTYPE_DATA_OTA)
|
|| (it->type == PART_TYPE_DATA && it->subtype == PART_SUBTYPE_DATA_OTA)
|
||||||
|| (it->type == PART_TYPE_DATA && it->subtype == PART_SUBTYPE_DATA_NVS_KEYS))) {
|
|| (it->type == PART_TYPE_DATA && it->subtype == PART_SUBTYPE_DATA_NVS_KEYS)) {
|
||||||
/* If encryption is turned on, all app partitions and OTA data
|
/* If encryption is turned on, all app partitions and OTA data
|
||||||
are always encrypted */
|
are always encrypted */
|
||||||
item->info.encrypted = true;
|
item->info.encrypted = true;
|
||||||
|
|
Ładowanie…
Reference in New Issue