I need OTA refresh in my ESP IDF 5 (master branch) used application. It needs https and I already used a certificate in my application for mqtt communication and there is no problem. I want to used this same server for OTA, but it does not works.
I have a global cert in my code used for mqtt and https like this:
Code: Select all
extern const uint8_t server_cert_pem_start[] asm("_binary_ca_cert_pem_start");
extern const uint8_t server_cert_pem_end[] asm("_binary_ca_cert_pem_end");
Code: Select all
esp_http_client_config_t config = {
.url = url,
.cert_pem = (char *)server_cert_pem_start,
.cert_len = server_cert_pem_end-server_cert_pem_start,
.event_handler = http_event_handler,
.transport_type=HTTP_TRANSPORT_OVER_SSL,
.keep_alive_enable = true
};
esp_https_ota_config_t ota_client_config = {
.http_config=&config,
};
How can I configure https for OTA in esp 5?
thx
Zamek