From fbc9c729b296edd4b1bfcb18b58dc2a99913874b Mon Sep 17 00:00:00 2001 From: Mahavir Jain Date: Fri, 28 Jan 2022 16:41:22 +0530 Subject: [PATCH] esp_https_ota: rename config option for more clarity --- components/esp_https_ota/sdkconfig.rename | 4 ++++ components/esp_https_ota/src/esp_https_ota.c | 4 ++-- examples/system/ota/README.md | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 components/esp_https_ota/sdkconfig.rename diff --git a/components/esp_https_ota/sdkconfig.rename b/components/esp_https_ota/sdkconfig.rename new file mode 100644 index 0000000000..8e3daa2f53 --- /dev/null +++ b/components/esp_https_ota/sdkconfig.rename @@ -0,0 +1,4 @@ +# sdkconfig replacement configurations for deprecated options formatted as +# CONFIG_DEPRECATED_OPTION CONFIG_NEW_OPTION + +CONFIG_OTA_ALLOW_HTTP CONFIG_ESP_HTTPS_OTA_ALLOW_HTTP diff --git a/components/esp_https_ota/src/esp_https_ota.c b/components/esp_https_ota/src/esp_https_ota.c index 68123ce20f..027abd438d 100644 --- a/components/esp_https_ota/src/esp_https_ota.c +++ b/components/esp_https_ota/src/esp_https_ota.c @@ -209,8 +209,8 @@ esp_err_t esp_https_ota_begin(esp_https_ota_config_t *ota_config, esp_https_ota_ } if (!is_server_verification_enabled(ota_config)) { -#if CONFIG_OTA_ALLOW_HTTP - ESP_LOGW(TAG, "Continuing with insecure option because CONFIG_OTA_ALLOW_HTTP is set."); +#if CONFIG_ESP_HTTPS_OTA_ALLOW_HTTP + ESP_LOGW(TAG, "Continuing with insecure option because CONFIG_ESP_HTTPS_OTA_ALLOW_HTTP is set."); #else ESP_LOGE(TAG, "No option for server verification is enabled in esp_http_client config."); *handle = NULL; diff --git a/examples/system/ota/README.md b/examples/system/ota/README.md index 9704c8558f..5e8c8ab644 100644 --- a/examples/system/ota/README.md +++ b/examples/system/ota/README.md @@ -146,7 +146,7 @@ Running a local https server might be tricky in some cases (due to self signed c * Run a plain HTTP server to test the connection. (Note that using a plain http is **not secure** and should only be used for testing) - Execute `python -m http.server 8070` in the directory with the firmware image - Use http://:8070/ as the firmware upgrade URL - - Enable *Allow HTTP for OTA* (`CONFIG_OTA_ALLOW_HTTP`) in `Component config -> ESP HTTPS OTA` so the URI without TLS is accepted + - Enable *Allow HTTP for OTA* (`CONFIG_ESP_HTTPS_OTA_ALLOW_HTTP`) in `Component config -> ESP HTTPS OTA` so the URI without TLS is accepted * Start the https server using [example_test](simple_ota_example/example_test.py) with two or more parameters: `example_test.py [CERT_DIR]`, where: - `` is a directory containing the image and by default also the certificate and key files:`ca_cert.pem` and `ca_key.pem` - `` is the server's port, here `8070`