Lines Matching full:if
26 #if CONFIG_IDF_TARGET_ESP32
39 * and if required encrypt the partitions in flash memory
62 #if CONFIG_IDF_TARGET_ESP32 in esp_flash_encryption_enabled()
70 if (flash_crypt_cnt & 1) { in esp_flash_encryption_enabled()
93 if (esp_efuse_read_field_bit(WR_DIS_CRYPT_CNT)) { in esp_flash_encrypt_is_write_protected()
94 if (print_error) { in esp_flash_encrypt_is_write_protected()
109 if (flash_crypt_cnt % 2 == 1) { in esp_flash_encrypt_state()
112 if (flash_crypt_wr_dis) { in esp_flash_encrypt_state()
124 if (!flash_encryption_enabled) { in esp_flash_encrypt_check_and_update()
126 if (esp_flash_encrypt_is_write_protected(true)) { in esp_flash_encrypt_check_and_update()
131 if (err != ESP_OK) { in esp_flash_encrypt_check_and_update()
137 if (err != ESP_OK) { in esp_flash_encrypt_check_and_update()
143 if (err != ESP_OK) { in esp_flash_encrypt_check_and_update()
165 if (coding_scheme != EFUSE_CODING_SCHEME_NONE && coding_scheme != EFUSE_CODING_SCHEME_3_4) { in check_and_generate_encryption_keys()
169 if (coding_scheme == EFUSE_CODING_SCHEME_3_4) { in check_and_generate_encryption_keys()
179 if (esp_efuse_find_purpose(ESP_EFUSE_KEY_PURPOSE_XTS_AES_128_KEY, NULL)) { in check_and_generate_encryption_keys()
204 …if (tmp_has_key) { // For ESP32: esp_efuse_find_purpose() always returns True, need to check wheth… in check_and_generate_encryption_keys()
207 if (i == 1 && tmp_has_key != has_key) { in check_and_generate_encryption_keys()
214 if (!has_key) { in check_and_generate_encryption_keys()
224 if (err != ESP_OK) { in check_and_generate_encryption_keys()
225 if (err == ESP_ERR_NOT_ENOUGH_UNUSED_KEY_BLOCKS) { in check_and_generate_encryption_keys()
234 if (!esp_efuse_get_key_dis_write(blocks[i]) in check_and_generate_encryption_keys()
237 … ESP_LOGE(TAG, "Invalid key state, check read&write protection for key and keypurpose(if exists)"); in check_and_generate_encryption_keys()
248 if (esp_flash_encryption_enabled() || esp_flash_encrypt_initialized_once()) { in esp_flash_encrypt_init()
258 if (err != ESP_OK) { in esp_flash_encrypt_init()
264 if (err != ESP_OK) { in esp_flash_encrypt_init()
270 if (err != ESP_OK) { in esp_flash_encrypt_init()
288 if (err != ESP_OK) { in esp_flash_encrypt_contents()
292 /* If the primary slot executable application is not encrypted, in esp_flash_encrypt_contents()
296 if (err != ESP_OK) { in esp_flash_encrypt_contents()
307 if (err != ESP_OK) { in esp_flash_encrypt_contents()
315 if (err != ESP_OK) { in esp_flash_encrypt_contents()
320 #if defined(CONFIG_ESP_IMAGE_NUMBER) && (CONFIG_ESP_IMAGE_NUMBER == 2) in esp_flash_encrypt_contents()
324 if (err != ESP_OK) { in esp_flash_encrypt_contents()
330 if (err != ESP_OK) { in esp_flash_encrypt_contents()
343 if (!esp_flash_encryption_enabled()) { in esp_flash_encrypt_enable()
345 if (esp_flash_encrypt_is_write_protected(true)) { in esp_flash_encrypt_enable()
362 #if defined(CONFIG_SECURE_FLASH_ENCRYPTION_MODE_RELEASE) && defined(CONFIG_SOC_FLASH_ENCRYPTION_XTS… in esp_flash_encrypt_enable()
383 /* Check for plaintext bootloader (verification will fail if it's already encrypted) */ in encrypt_bootloader()
384 if (esp_image_verify_bootloader(&image_length) == ESP_OK) { in encrypt_bootloader()
388 if (err != ESP_OK) { in encrypt_bootloader()
405 if (image->header_magic != ESP_LOAD_HEADER_MAGIC) { in verify_img_header()
406 if (!silent) { in verify_img_header()
422 /* Check if the slot is plaintext or encrypted, 0x20 offset is for skipping in encrypt_primary_slot()
427 if (err != ESP_OK) { in encrypt_primary_slot()
435 if (err == ESP_OK) { in encrypt_primary_slot()
440 if (err != ESP_OK) { in encrypt_primary_slot()
456 if (src_addr % FLASH_SECTOR_SIZE != 0) { in esp_flash_encrypt_region()
468 if (err != ESP_OK) { in esp_flash_encrypt_region()
472 if (err != ESP_OK) { in esp_flash_encrypt_region()
476 if (err != ESP_OK) { in esp_flash_encrypt_region()