From: Tian Zhong Xing Date: Tue, 24 Jan 2017 10:30:13 +0000 (+0800) Subject: bootloader_support: fix bug OTA & flash encryption incompatible X-Git-Tag: v2.0-rc2~60^2~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2173ad3b4543553383edd795e7fa04416d682ebc;p=esp-idf bootloader_support: fix bug OTA & flash encryption incompatible ota data partition should be encrypted unconditionally when flash encrypt enable --- diff --git a/components/bootloader_support/src/flash_encrypt.c b/components/bootloader_support/src/flash_encrypt.c index 8b9ca60cd1..8ba068d03b 100644 --- a/components/bootloader_support/src/flash_encrypt.c +++ b/components/bootloader_support/src/flash_encrypt.c @@ -285,6 +285,9 @@ static esp_err_t encrypt_partition(int index, const esp_partition_info_t *partit } else { should_encrypt = false; } + } else if (partition->type == PART_TYPE_DATA && partition->subtype == PART_SUBTYPE_DATA_OTA) { + /* check if we have ota data partition and the partition should be encrypted unconditionally */ + should_encrypt = true; } if (!should_encrypt) {