For https connection `ESP_TLS_ERR_SSL_WANT_READ` of esp_transport_read was getting treated as error.
Treated this as a timeout to fix connection abort issue!
Also handled http connection EAGAIN with `errno == EAGAIN` check.
Signed-off-by: Vikram Dattu <vikram.dattu@espressif.com>
Fix below build warning when CONFIG_OTA_ALLOW_HTTP is set:
esp_https_ota.c:165:13: warning: 'is_server_verification_enabled' defined but not used [-Wunused-function]
While at it, also simplify the is_server_verification_enabled logic.
Fixes: 48987ad9df ("esp_https_ota: Enable option of using global_ca_store and x509_crt_bundle")
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Closes https://github.com/espressif/esp-idf/pull/6882
Signed-off-by: Aditya Patwardhan <aditya.patwardhan@espressif.com>
Fix counters for POST request in OTA and compare auth string in case insensitive fashion
Closes IDFGH-5059, IDFGH-5055, and IDFGH-5056
See merge request espressif/esp-idf!13069
components/esp_https_ota: Changes in public requirement list for CMake and esp_ota_ops.h is included in esp_https_ota.c
bootloader_support is added in public requirements of CMake
bootloader_common.h is included in esp_https_ota.h
Closes https://github.com/espressif/esp-idf/issues/4198
Closes IDFGH-2066
Current implimentation of esp_http_ota does not perform any error-checking in the data writing phase calls `esp_ota_get_next_update_partition()` irrespetive of the received state of the image. A few additional error checking mechanism have now been added inside the esp_https_ota which returns the control in case an invalid header is received and a wrapper to the function `esp_http_client_is_complete_data_received()` of `esp_http_client` has been added.
Bugfixes:
- Fix http url redirection issue
- Fix basic/digest auth issue with http url
Features:
- Add support for adding custom http header
- Add support for reading firmware image header
- Add support for monitoring upgrade status
- This requires breaking down esp_https_ota API such that it allows finer application level control
- For simpler use-cases previous API is still supported
Closes https://github.com/espressif/esp-idf/issues/3218
Closes https://github.com/espressif/esp-idf/issues/2921