forked from espressif/esp-idf
example: https_request update free client session api
This commit is contained in:
@@ -68,7 +68,7 @@ static const char REQUEST[] = "GET " WEB_URL " HTTP/1.1\r\n"
|
|||||||
extern const uint8_t server_root_cert_pem_start[] asm("_binary_server_root_cert_pem_start");
|
extern const uint8_t server_root_cert_pem_start[] asm("_binary_server_root_cert_pem_start");
|
||||||
extern const uint8_t server_root_cert_pem_end[] asm("_binary_server_root_cert_pem_end");
|
extern const uint8_t server_root_cert_pem_end[] asm("_binary_server_root_cert_pem_end");
|
||||||
#ifdef CONFIG_ESP_TLS_CLIENT_SESSION_TICKETS
|
#ifdef CONFIG_ESP_TLS_CLIENT_SESSION_TICKETS
|
||||||
esp_tls_client_session_t *tls_client_session = NULL;
|
static esp_tls_client_session_t *tls_client_session = NULL;
|
||||||
#endif
|
#endif
|
||||||
static void https_get_request(esp_tls_cfg_t cfg)
|
static void https_get_request(esp_tls_cfg_t cfg)
|
||||||
{
|
{
|
||||||
@@ -187,7 +187,7 @@ static void https_get_request_using_already_saved_session(void)
|
|||||||
.client_session = tls_client_session,
|
.client_session = tls_client_session,
|
||||||
};
|
};
|
||||||
https_get_request(cfg);
|
https_get_request(cfg);
|
||||||
free(tls_client_session);
|
esp_tls_free_client_session(tls_client_session);
|
||||||
tls_client_session = NULL;
|
tls_client_session = NULL;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user