mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-07-23 15:27:28 +02:00
feat(asio): Updates asio to 1.28
Updates ASIO version
This commit is contained in:
@ -13,7 +13,7 @@ jobs:
|
|||||||
name: Build
|
name: Build
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
idf_ver: ["latest", "release-v5.0"]
|
idf_ver: ["latest", "release-v5.0", "release-v5.1"]
|
||||||
idf_target: ["esp32", "esp32s2"]
|
idf_target: ["esp32", "esp32s2"]
|
||||||
example: ["asio_chat", "async_request", "socks4", "ssl_client_server", "tcp_echo_server", "udp_echo_server"]
|
example: ["asio_chat", "async_request", "socks4", "ssl_client_server", "tcp_echo_server", "udp_echo_server"]
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
|
@ -7,9 +7,9 @@ if(NOT CONFIG_LWIP_IPV6 AND NOT CMAKE_BUILD_EARLY_EXPANSION)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(asio_sources "asio/asio/src/asio.cpp")
|
set(asio_sources "asio/asio/src/asio.cpp")
|
||||||
|
set(asio_requires lwip)
|
||||||
|
|
||||||
if(CONFIG_ASIO_SSL_SUPPORT)
|
if(CONFIG_ASIO_SSL_SUPPORT)
|
||||||
if(CONFIG_ASIO_USE_ESP_OPENSSL)
|
|
||||||
list(APPEND asio_sources
|
list(APPEND asio_sources
|
||||||
"port/src/asio_ssl_impl.cpp"
|
"port/src/asio_ssl_impl.cpp"
|
||||||
"port/mbedtls/src/mbedtls_context.cpp"
|
"port/mbedtls/src/mbedtls_context.cpp"
|
||||||
@ -17,28 +17,30 @@ if(CONFIG_ASIO_SSL_SUPPORT)
|
|||||||
set(asio_priv_includes "port/mbedtls/include")
|
set(asio_priv_includes "port/mbedtls/include")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CONFIG_ASIO_USE_ESP_WOLFSSL)
|
|
||||||
list(APPEND asio_sources
|
|
||||||
"asio/asio/src/asio_ssl.cpp")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
idf_component_register(SRCS ${asio_sources}
|
idf_component_register(SRCS ${asio_sources}
|
||||||
INCLUDE_DIRS "asio/asio/include" "port/include"
|
INCLUDE_DIRS "asio/asio/include" "port/include"
|
||||||
PRIV_INCLUDE_DIRS ${asio_priv_includes}
|
PRIV_INCLUDE_DIRS ${asio_priv_includes}
|
||||||
REQUIRES lwip)
|
PRIV_REQUIRES ${asio_requires})
|
||||||
|
|
||||||
if(CONFIG_ASIO_SSL_SUPPORT)
|
target_compile_definitions(${COMPONENT_LIB} PUBLIC SA_RESTART=0x01
|
||||||
if(CONFIG_ASIO_USE_ESP_WOLFSSL)
|
SA_NOCLDSTOP=0x2
|
||||||
idf_component_get_property(wolflib esp-wolfssl COMPONENT_LIB)
|
SA_NOCLDWAIT=0x4
|
||||||
idf_component_get_property(wolfdir esp-wolfssl COMPONENT_DIR)
|
ASIO_DISABLE_SERIAL_PORT
|
||||||
|
ASIO_SEPARATE_COMPILATION
|
||||||
|
ASIO_STANDALONE
|
||||||
|
ASIO_HAS_PTHREADS
|
||||||
|
OPENSSL_NO_ENGINE
|
||||||
|
)
|
||||||
|
|
||||||
target_link_libraries(${COMPONENT_LIB} PUBLIC ${wolflib})
|
if(NOT CONFIG_COMPILER_CXX_EXCEPTIONS)
|
||||||
target_include_directories(${COMPONENT_LIB} PUBLIC ${wolfdir}/wolfssl/wolfssl)
|
target_compile_definitions(${COMPONENT_LIB} PUBLIC ASIO_NO_EXCEPTIONS)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CONFIG_ASIO_USE_ESP_OPENSSL)
|
if(NOT CONFIG_COMPILER_RTTI)
|
||||||
|
target_compile_definitions(${COMPONENT_LIB} PUBLIC ASIO_NO_TYPEID)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CONFIG_ASIO_SSL_SUPPORT)
|
||||||
idf_component_get_property(mbedtls mbedtls COMPONENT_LIB)
|
idf_component_get_property(mbedtls mbedtls COMPONENT_LIB)
|
||||||
target_link_libraries(${COMPONENT_LIB} PUBLIC ${mbedtls})
|
target_link_libraries(${COMPONENT_LIB} PUBLIC ${mbedtls})
|
||||||
endif()
|
endif()
|
||||||
endif()
|
|
||||||
|
@ -6,23 +6,6 @@ menu "ESP-ASIO"
|
|||||||
default n
|
default n
|
||||||
help
|
help
|
||||||
Enable support for basic SSL/TLS features, available for mbedTLS/OpenSSL
|
Enable support for basic SSL/TLS features, available for mbedTLS/OpenSSL
|
||||||
as well as wolfSSL TLS library.
|
|
||||||
|
|
||||||
choice ASIO_SSL_LIBRARY_CHOICE
|
|
||||||
prompt "Choose SSL/TLS library for ESP-TLS (See help for more Info)"
|
|
||||||
default ASIO_USE_ESP_OPENSSL
|
|
||||||
depends on ASIO_SSL_SUPPORT
|
|
||||||
help
|
|
||||||
The ASIO support multiple backend TLS libraries. Currently the mbedTLS with a thin ESP-OpenSSL
|
|
||||||
port layer (default choice) and WolfSSL are supported.
|
|
||||||
Different TLS libraries may support different features and have different resource
|
|
||||||
usage. Consult the ESP-TLS documentation in ESP-IDF Programming guide for more details.
|
|
||||||
config ASIO_USE_ESP_OPENSSL
|
|
||||||
bool "esp-openssl"
|
|
||||||
config ASIO_USE_ESP_WOLFSSL
|
|
||||||
depends on TLS_STACK_WOLFSSL
|
|
||||||
bool "wolfSSL (License info in wolfSSL directory README)"
|
|
||||||
endchoice
|
|
||||||
|
|
||||||
config ASIO_SSL_BIO_SIZE
|
config ASIO_SSL_BIO_SIZE
|
||||||
int "Size of BIO object"
|
int "Size of BIO object"
|
||||||
|
Submodule components/asio/asio updated: 58384fb6af...9cf116aa63
@ -1,45 +1,12 @@
|
|||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2018-2022 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileCopyrightText: 2018-2023 Espressif Systems (Shanghai) CO LTD
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
#ifndef _ESP_ASIO_CONFIG_H_
|
#ifndef _ESP_ASIO_CONFIG_H_
|
||||||
#define _ESP_ASIO_CONFIG_H_
|
#define _ESP_ASIO_CONFIG_H_
|
||||||
|
|
||||||
//
|
|
||||||
// Enabling exceptions only when they are enabled in menuconfig
|
|
||||||
//
|
|
||||||
# include <sdkconfig.h>
|
|
||||||
# ifndef CONFIG_COMPILER_CXX_EXCEPTIONS
|
|
||||||
# define ASIO_NO_EXCEPTIONS
|
|
||||||
# endif // CONFIG_COMPILER_CXX_EXCEPTIONS
|
|
||||||
|
|
||||||
# ifndef CONFIG_COMPILER_RTTI
|
|
||||||
# define ASIO_NO_TYPEID
|
|
||||||
# endif // CONFIG_COMPILER_RTTI
|
|
||||||
|
|
||||||
//
|
|
||||||
// Use system sockets
|
|
||||||
//
|
|
||||||
# include "sys/socket.h"
|
|
||||||
|
|
||||||
//
|
|
||||||
// Specific ASIO feature flags
|
|
||||||
//
|
|
||||||
# define ASIO_DISABLE_SERIAL_PORT
|
|
||||||
# define ASIO_SEPARATE_COMPILATION
|
|
||||||
# define ASIO_STANDALONE
|
|
||||||
# define ASIO_HAS_PTHREADS
|
|
||||||
# define ASIO_DISABLE_CONCEPTS
|
|
||||||
|
|
||||||
# ifdef CONFIG_ASIO_USE_ESP_OPENSSL
|
|
||||||
# define ASIO_USE_ESP_OPENSSL
|
|
||||||
# define OPENSSL_NO_ENGINE
|
|
||||||
#define ASIO_SSL_DETAIL_OPENSSL_TYPES_HPP
|
#define ASIO_SSL_DETAIL_OPENSSL_TYPES_HPP
|
||||||
#include "openssl_stub.hpp"
|
#include "openssl_stub.hpp"
|
||||||
|
|
||||||
# elif CONFIG_ASIO_USE_ESP_WOLFSSL
|
|
||||||
# define ASIO_USE_WOLFSSL
|
|
||||||
# endif // CONFIG_ASIO_USE_ESP_OPENSSL
|
|
||||||
|
|
||||||
#endif // _ESP_ASIO_CONFIG_H_
|
#endif // _ESP_ASIO_CONFIG_H_
|
||||||
|
Reference in New Issue
Block a user