forked from espressif/esp-idf
fix(bootloader_support): coverity reported warning
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user