mirror of
https://github.com/espressif/esp-idf.git
synced 2026-05-19 23:45:28 +02:00
esp_http_client: Enable support of crt_bundle in esp_http_client
This commit is contained in:
@@ -5,4 +5,4 @@
|
||||
|
||||
# embed files from the "certs" directory as binary data symbols
|
||||
# in the app
|
||||
COMPONENT_EMBED_TXTFILES := howsmyssl_com_root_cert.pem
|
||||
COMPONENT_EMBED_TXTFILES := howsmyssl_com_root_cert.pem postman_root_cert.pem
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "esp_netif.h"
|
||||
#include "protocol_examples_common.h"
|
||||
#include "esp_tls.h"
|
||||
#include "esp_crt_bundle.h"
|
||||
|
||||
#include "esp_http_client.h"
|
||||
|
||||
@@ -371,7 +372,7 @@ static void https_with_url(void)
|
||||
esp_http_client_config_t config = {
|
||||
.url = "https://www.howsmyssl.com",
|
||||
.event_handler = _http_event_handler,
|
||||
.cert_pem = howsmyssl_com_root_cert_pem_start,
|
||||
.crt_bundle_attach = esp_crt_bundle_attach,
|
||||
};
|
||||
esp_http_client_handle_t client = esp_http_client_init(&config);
|
||||
esp_err_t err = esp_http_client_perform(client);
|
||||
|
||||
Reference in New Issue
Block a user