I'm currently working with several ESP32 and OTA updates.
Since my app uses SSL/TLS certificates, I currently uses the following lines of code to get my .pem certificates from my project/server_certs folder and use them in my HTTPS client config :
Code: Select all
const uint8_t server_cert_pem_start[] asm("_binary_ca_cert_pem_start");
const uint8_t server_cert_pem_end[] asm("_binary_ca_cert_pem_end");
...
esp_http_client_config_t config = {
...,
.cert_pem = (char *)server_cert_pem_start,
...
};
Any advice about the way to do this?
Thanks for your help