esp_tls.h: Clean up included header files.

This commit is contained in:
Aditya Patwardhan
2022-05-02 11:00:19 +05:30
committed by BOT
parent 5b15c91ae4
commit aa9de02259
6 changed files with 24 additions and 27 deletions

View File

@@ -12,10 +12,10 @@ endif()
idf_component_register(SRCS "${srcs}" idf_component_register(SRCS "${srcs}"
INCLUDE_DIRS . esp-tls-crypto INCLUDE_DIRS . esp-tls-crypto
PRIV_INCLUDE_DIRS "private_include" PRIV_INCLUDE_DIRS "private_include"
# lwip and mbedtls are public requirements becasue esp_tls.h # mbedtls is public requirements becasue esp_tls.h
# includes sys/socket.h and mbedtls header files. # includes mbedtls header files.
REQUIRES mbedtls lwip REQUIRES mbedtls
PRIV_REQUIRES http_parser) PRIV_REQUIRES lwip http_parser)
if(CONFIG_ESP_TLS_USING_WOLFSSL) if(CONFIG_ESP_TLS_USING_WOLFSSL)
idf_component_get_property(wolfssl esp-wolfssl COMPONENT_LIB) idf_component_get_property(wolfssl esp-wolfssl COMPONENT_LIB)

View File

@@ -7,19 +7,11 @@
#define _ESP_TLS_H_ #define _ESP_TLS_H_
#include <stdbool.h> #include <stdbool.h>
#include <sys/socket.h>
#include <fcntl.h>
#include "esp_err.h" #include "esp_err.h"
#include "esp_tls_errors.h" #include "esp_tls_errors.h"
#include "sdkconfig.h" #include "sdkconfig.h"
#ifdef CONFIG_ESP_TLS_USING_MBEDTLS #ifdef CONFIG_ESP_TLS_USING_MBEDTLS
#include "mbedtls/platform.h"
#include "mbedtls/net_sockets.h"
#include "mbedtls/esp_debug.h"
#include "mbedtls/ssl.h" #include "mbedtls/ssl.h"
#include "mbedtls/entropy.h"
#include "mbedtls/ctr_drbg.h"
#include "mbedtls/error.h"
#ifdef CONFIG_ESP_TLS_SERVER_SESSION_TICKETS #ifdef CONFIG_ESP_TLS_SERVER_SESSION_TICKETS
#include "mbedtls/ssl_ticket.h" #include "mbedtls/ssl_ticket.h"
#endif #endif

View File

@@ -1,5 +1,5 @@
/* /*
* SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD * SPDX-FileCopyrightText: 2021-22 Espressif Systems (Shanghai) CO LTD
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
@@ -8,6 +8,10 @@
#define _ESP_TLS_ERRORS_H_ #define _ESP_TLS_ERRORS_H_
#include "esp_err.h" #include "esp_err.h"
#ifdef CONFIG_ESP_TLS_USING_MBEDTLS
#include "mbedtls/error.h"
#endif
/* For wolfSSL, errors are included through ssl.h which is included by default by esp_tls.h */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View File

@@ -10,6 +10,7 @@
#include "esp_err.h" #include "esp_err.h"
#include "esp_log.h" #include "esp_log.h"
#include "esp_mac.h" #include "esp_mac.h"
#include "sys/socket.h"
#if SOC_SHA_SUPPORT_PARALLEL_ENG #if SOC_SHA_SUPPORT_PARALLEL_ENG
#include "sha/sha_parallel_engine.h" #include "sha/sha_parallel_engine.h"
#elif SOC_SHA_SUPPORT_DMA #elif SOC_SHA_SUPPORT_DMA

View File

@@ -1,23 +1,20 @@
// Copyright 2020 Espressif Systems (Shanghai) PTE LTD /*
// * SPDX-FileCopyrightText: 2020-2022 Espressif Systems (Shanghai) CO LTD
// Licensed under the Apache License, Version 2.0 (the "License"); *
// you may not use this file except in compliance with the License. * SPDX-License-Identifier: Apache-2.0
// You may obtain a copy of the License at */
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef _ESP_TRANSPORT_INTERNAL_H_ #ifndef _ESP_TRANSPORT_INTERNAL_H_
#define _ESP_TRANSPORT_INTERNAL_H_ #define _ESP_TRANSPORT_INTERNAL_H_
#include "esp_transport.h" #include "esp_transport.h"
#include "sys/socket.h"
#include "sys/queue.h" #include "sys/queue.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef int (*get_socket_func)(esp_transport_handle_t t); typedef int (*get_socket_func)(esp_transport_handle_t t);
typedef struct esp_foundation_transport { typedef struct esp_foundation_transport {
@@ -116,4 +113,8 @@ void esp_transport_esp_tls_destroy(struct transport_esp_tls* transport_esp_tls);
*/ */
void esp_transport_set_errors(esp_transport_handle_t t, const esp_tls_error_handle_t error_handle); void esp_transport_set_errors(esp_transport_handle_t t, const esp_tls_error_handle_t error_handle);
#ifdef __cplusplus
}
#endif
#endif //_ESP_TRANSPORT_INTERNAL_H_ #endif //_ESP_TRANSPORT_INTERNAL_H_

View File

@@ -1606,7 +1606,6 @@ components/spi_flash/test/test_spi_flash.c
components/tcp_transport/include/esp_transport_ssl.h components/tcp_transport/include/esp_transport_ssl.h
components/tcp_transport/include/esp_transport_tcp.h components/tcp_transport/include/esp_transport_tcp.h
components/tcp_transport/include/esp_transport_ws.h components/tcp_transport/include/esp_transport_ws.h
components/tcp_transport/private_include/esp_transport_internal.h
components/tcp_transport/private_include/esp_transport_utils.h components/tcp_transport/private_include/esp_transport_utils.h
components/tcp_transport/test/tcp_transport_fixtures.h components/tcp_transport/test/tcp_transport_fixtures.h
components/tcp_transport/test/test_transport_basic.c components/tcp_transport/test/test_transport_basic.c