OVMS3-idf/components
Tim Nordell 7892cf6a03 partition: Fix "encrypted" read/write when encryption is disabled
According to the documentation[1][2] for partitions, setting the encrypted
flag for partitions should be a no-op when system level encryption isn't
enabled.  The current implementation, however, does not actually match
the documentation and it ends up with an unreadable partition via the
partition API if a partition flag is marked as encrypted without
system-level encryption enabled.  (This is because the writes go through
the encryption block, and reads do not go through the encryption block
when this situation occurs causing unreadable data to the application
running.) This fixes up the read-back of the partition table to match
whether or not the partition is currently encrypted under the hood.

This should not affect the bootloader's code for reading/writing encrypted
partitions as the bootloader directly invokes the spi_flash_write*(...)
APIs.

[1] https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/partition-tables.html#flags
[2] https://docs.espressif.com/projects/esp-idf/en/latest/security/flash-encryption.html#encrypted-partition-flag

Closes https://github.com/espressif/esp-idf/pull/3328

Signed-off-by: Tim Nordell <tim.nordell@nimbelink.com>
2019-05-03 15:03:04 +05:30
..
app_trace global: move the soc component out of the common list 2019-04-16 13:21:15 +08:00
app_update global: move the soc component out of the common list 2019-04-16 13:21:15 +08:00
asio cmake: make main a component again 2018-09-11 09:44:12 +08:00
bootloader global: move the soc component out of the common list 2019-04-16 13:21:15 +08:00
bootloader_support Merge branch 'feature/make_bootloader_support_target_dependent' into 'master' 2019-04-26 15:36:48 +08:00
bt Merge branch 'bugfix/btdm_abort_if_deinit_spp_without_init' into 'master' 2019-04-25 20:38:37 +08:00
coap coap: define WITH_POSIX in coap_config.h instead of globally 2019-03-28 16:29:13 +08:00
console separate rom from esp32 component to esp_rom 2019-03-21 18:51:45 +08:00
cxx global: move the soc component out of the common list 2019-04-16 13:21:15 +08:00
driver spi_master: fix the dual/quad io issue 2019-04-27 01:36:47 +08:00
efuse global: move the soc component out of the common list 2019-04-16 13:21:15 +08:00
esp-tls esp_tls: fix incorrect closing of fd 0 on connection failure 2019-04-15 10:59:50 +05:30
esp32 Merge branch 'bugfix/pm_isr_exit_lock' into 'master' 2019-04-18 11:16:26 +08:00
esp_adc_cal Correct Kconfigs according to the coding style 2019-01-29 13:37:01 +01:00
esp_common global: move the soc component out of the common list 2019-04-16 13:21:15 +08:00
esp_event test: clean up "leaks" tags from most unit tests 2019-04-16 20:07:40 +08:00
esp_http_client esp-http-client: Fix incorrect event name HTTP_EVENT_HEADER_SENT 2019-05-02 16:15:59 +05:30
esp_http_server esp_http_server : Test added to check limit on max_open_sockets config option 2019-04-03 13:34:12 +00:00
esp_https_ota esp_http_client: add support for using certs from global ca store 2019-02-27 14:19:06 +05:30
esp_https_server HTTP Server: Added ability to select core 2019-03-21 11:22:58 +08:00
esp_ringbuf ldgen: update component linker fragment files 2019-04-04 15:57:34 +08:00
esp_rom global: move the soc component out of the common list 2019-04-16 13:21:15 +08:00
esp_wifi esp_wifi: fix the bug that WPS fails when AP is encrypted 2019-04-24 13:57:14 +08:00
espcoredump global: move the soc component out of the common list 2019-04-16 13:21:15 +08:00
esptool_py Rename deprecated Kconfig options in a backward compatible way 2019-04-24 12:53:02 +02:00
ethernet global: move the soc component out of the common list 2019-04-16 13:21:15 +08:00
expat cmake: Add support for test build 2018-10-20 12:07:24 +08:00
fatfs Merge branch 'feature/remove_dependency_to_soc' into 'master' 2019-04-18 08:08:41 +08:00
freemodbus freemodbus: Fix bug with incorrect coils read mask 2019-04-16 10:21:20 +02:00
freertos global: move the soc component out of the common list 2019-04-16 13:21:15 +08:00
heap global: move the soc component out of the common list 2019-04-16 13:21:15 +08:00
idf_test test: sync integration test cases 2019-04-19 16:44:00 +08:00
jsmn cmake: make main a component again 2018-09-11 09:44:12 +08:00
json cmake: make main a component again 2018-09-11 09:44:12 +08:00
libsodium Correct Kconfigs according to the coding style 2019-01-29 13:37:01 +01:00
log global: move the soc component out of the common list 2019-04-16 13:21:15 +08:00
lwip Merge branch 'bugfix/select_init_sem' into 'master' 2019-04-25 19:10:08 +08:00
mbedtls global: move the soc component out of the common list 2019-04-16 13:21:15 +08:00
mdns mdns: use esp_event library to handle events 2019-04-11 12:04:58 +08:00
mqtt mqtt tests: adding weekend test for mqtt library to exercise publishing/receiving different data and references esp-mqtt commits to pass these tests 2019-03-22 11:37:26 +01:00
newlib Merge branch 'feature/remove_dependency_to_soc' into 'master' 2019-04-18 08:08:41 +08:00
nghttp cmake: make main a component again 2018-09-11 09:44:12 +08:00
nvs_flash nvs_flash: Multi-page blob erased using nvs_erase_key should be cleaned properly 2019-04-10 11:45:29 +00:00
openssl Correct Kconfigs according to the coding style 2019-01-29 13:37:01 +01:00
partition_table partition_table: restore needed factory offset variable 2019-03-22 15:24:23 +08:00
protobuf-c protobuf-c : Added Google's protocol buffer C library as sub-module 2018-10-02 19:07:28 +05:30
protocomm Unified Provisioning: Miscellaneous fixes in BLE 2019-04-05 14:27:24 +05:30
pthread global: move the soc component out of the common list 2019-04-16 13:21:15 +08:00
sdmmc global: move the soc component out of the common list 2019-04-16 13:21:15 +08:00
smartconfig_ack cmake: make main a component again 2018-09-11 09:44:12 +08:00
soc spi_master: fix the dual/quad io issue 2019-04-27 01:36:47 +08:00
spi_flash partition: Fix "encrypted" read/write when encryption is disabled 2019-05-03 15:03:04 +05:30
spiffs Merge branch 'feature/remove_dependency_to_soc' into 'master' 2019-04-18 08:08:41 +08:00
tcp_transport transport_ws: Stop connecting when the parent's connect call has failed 2019-04-04 16:14:42 +02:00
tcpip_adapter tcpip_adapter: unregister shutdown handlers, don’t fail on repeated registration 2019-04-11 12:04:58 +08:00
ulp global: move the soc component out of the common list 2019-04-16 13:21:15 +08:00
unity Add support a [leaks] tag for UT 2019-04-12 09:31:23 +08:00
vfs Merge branch 'bugfix/select_init_sem' into 'master' 2019-04-25 19:10:08 +08:00
wear_levelling global: move the soc component out of the common list 2019-04-16 13:21:15 +08:00
wifi_provisioning wifi_provisioning : context pointer added to wifi_config_t structure and related examples/docs updated 2019-02-15 10:45:34 +00:00
wpa_supplicant global: move the soc component out of the common list 2019-04-16 13:21:15 +08:00
xtensa global: move the soc component out of the common list 2019-04-16 13:21:15 +08:00