fix(bootloader_support): coverity reported warning

This commit is contained in:
Mahavir Jain
2025-02-04 11:41:17 +05:30
parent 074852664d
commit 46965784b8

View File

@@ -175,10 +175,12 @@ static esp_err_t check_and_generate_encryption_keys(void)
if (tmp_has_key) { // For ESP32: esp_efuse_find_purpose() always returns True, need to check whether the key block is used or not.
tmp_has_key &= !esp_efuse_key_block_unused(blocks[i]);
}
#if CONFIG_SECURE_FLASH_ENCRYPTION_AES256
if (i == 1 && tmp_has_key != has_key) {
ESP_LOGE(TAG, "Invalid efuse key blocks: Both AES-256 key blocks must be set.");
return ESP_ERR_INVALID_STATE;
}
#endif
has_key &= tmp_has_key;
}