feat: code cleanup

This commit is contained in:
Ashish Sharma
2025-12-15 18:43:01 +08:00
parent 3dea3aae1d
commit 76287081ea
96 changed files with 459 additions and 4610 deletions

View File

@@ -27,8 +27,6 @@
#include "mbedtls/net_sockets.h"
#include "mbedtls/esp_debug.h"
#include "mbedtls/ssl.h"
// #include "mbedtls/entropy.h"
// #include "mbedtls/ctr_drbg.h"
#include "mbedtls/error.h"
#ifdef CONFIG_MBEDTLS_SSL_PROTO_TLS1_3
#include "psa/crypto.h"
@@ -54,8 +52,6 @@ static void https_get_task(void *pvParameters)
char buf[512];
int ret, flags, len;
// mbedtls_entropy_context entropy;
// mbedtls_ctr_drbg_context ctr_drbg;
mbedtls_ssl_context ssl;
mbedtls_x509_crt cacert;
mbedtls_ssl_config conf;
@@ -68,14 +64,6 @@ static void https_get_task(void *pvParameters)
mbedtls_ssl_config_init(&conf);
// mbedtls_entropy_init(&entropy);
// if((ret = mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy,
// NULL, 0)) != 0)
// {
// ESP_LOGE(TAG, "mbedtls_ctr_drbg_seed returned %d", ret);
// abort();
// }
ESP_LOGI(TAG, "Attaching the certificate bundle...");
ret = esp_crt_bundle_attach(&conf);
@@ -108,7 +96,6 @@ static void https_get_task(void *pvParameters)
mbedtls_ssl_conf_authmode(&conf, MBEDTLS_SSL_VERIFY_REQUIRED);
mbedtls_ssl_conf_ca_chain(&conf, &cacert, NULL);
// mbedtls_ssl_conf_rng(&conf, mbedtls_ctr_drbg_random, &ctr_drbg);
#ifdef CONFIG_MBEDTLS_DEBUG
mbedtls_esp_enable_debug_log(&conf, CONFIG_MBEDTLS_DEBUG_LEVEL);
#endif