esp-tls: extending error handle to contain error descriptors with last mbedtls failure and latest certificate verification result flags, reworked tcp_transport to use this error handle

This commit is contained in:
David Cermak
2019-04-16 11:58:38 +02:00
parent 2972f96982
commit 587739391c
13 changed files with 210 additions and 90 deletions

View File

@@ -16,7 +16,7 @@
#ifndef _HTTP_UTILS_H_
#define _HTTP_UTILS_H_
#include <sys/time.h>
#include "esp_transport_utils.h"
/**
* @brief Assign new_str to *str pointer, and realloc *str if it not NULL
*
@@ -80,7 +80,9 @@ char *http_utils_join_string(const char *first_str, int len_first, const char *s
int http_utils_str_starts_with(const char *str, const char *start);
#define HTTP_MEM_CHECK(TAG, a, action) ESP_TRANSPORT_MEM_CHECK(TAG, a, action)
#define HTTP_MEM_CHECK(TAG, a, action) if (!(a)) { \
ESP_LOGE(TAG,"%s:%d (%s): %s", __FILE__, __LINE__, __FUNCTION__, "Memory exhausted"); \
action; \
}
#endif