esp_http_client: add support for using certs from global ca store

Closes https://github.com/espressif/esp-idf/issues/3062
This commit is contained in:
Mahavir Jain
2019-02-20 12:48:45 +05:30
parent 42f64e9a93
commit 27e00cf7aa
5 changed files with 21 additions and 3 deletions

View File

@@ -36,8 +36,8 @@ esp_err_t esp_https_ota(const esp_http_client_config_t *config)
}
#if !CONFIG_OTA_ALLOW_HTTP
if (!config->cert_pem) {
ESP_LOGE(TAG, "Server certificate not found in esp_http_client config");
if (!config->cert_pem && !config->use_global_ca_store) {
ESP_LOGE(TAG, "Server certificate not found, either through configuration or global CA store");
return ESP_ERR_INVALID_ARG;
}
#endif