Skip to content

Commit b310abe

Browse files
feat(asio): Updates asio to 1.28
Updates ASIO version
1 parent 842b2b2 commit b310abe

File tree

5 files changed

+29
-77
lines changed

5 files changed

+29
-77
lines changed

.github/workflows/asio__build-target-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
name: Build
1414
strategy:
1515
matrix:
16-
idf_ver: ["latest", "release-v5.0"]
16+
idf_ver: ["latest", "release-v5.0", "release-v5.1"]
1717
idf_target: ["esp32", "esp32s2"]
1818
example: ["asio_chat", "async_request", "socks4", "ssl_client_server", "tcp_echo_server", "udp_echo_server"]
1919
runs-on: ubuntu-20.04

components/asio/CMakeLists.txt

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,38 +7,40 @@ if(NOT CONFIG_LWIP_IPV6 AND NOT CMAKE_BUILD_EARLY_EXPANSION)
77
endif()
88

99
set(asio_sources "asio/asio/src/asio.cpp")
10+
set(asio_requires lwip)
1011

1112
if(CONFIG_ASIO_SSL_SUPPORT)
12-
if(CONFIG_ASIO_USE_ESP_OPENSSL)
13-
list(APPEND asio_sources
14-
"port/src/asio_ssl_impl.cpp"
15-
"port/mbedtls/src/mbedtls_context.cpp"
16-
"port/mbedtls/src/mbedtls_engine.cpp")
17-
set(asio_priv_includes "port/mbedtls/include")
18-
endif()
19-
20-
if(CONFIG_ASIO_USE_ESP_WOLFSSL)
21-
list(APPEND asio_sources
22-
"asio/asio/src/asio_ssl.cpp")
23-
endif()
13+
list(APPEND asio_sources
14+
"port/src/asio_ssl_impl.cpp"
15+
"port/mbedtls/src/mbedtls_context.cpp"
16+
"port/mbedtls/src/mbedtls_engine.cpp")
17+
set(asio_priv_includes "port/mbedtls/include")
2418
endif()
2519

2620
idf_component_register(SRCS ${asio_sources}
2721
INCLUDE_DIRS "asio/asio/include" "port/include"
2822
PRIV_INCLUDE_DIRS ${asio_priv_includes}
29-
REQUIRES lwip)
23+
PRIV_REQUIRES ${asio_requires})
3024

31-
if(CONFIG_ASIO_SSL_SUPPORT)
32-
if(CONFIG_ASIO_USE_ESP_WOLFSSL)
33-
idf_component_get_property(wolflib esp-wolfssl COMPONENT_LIB)
34-
idf_component_get_property(wolfdir esp-wolfssl COMPONENT_DIR)
25+
target_compile_definitions(${COMPONENT_LIB} PUBLIC SA_RESTART=0x01
26+
SA_NOCLDSTOP=0x2
27+
SA_NOCLDWAIT=0x4
28+
ASIO_DISABLE_SERIAL_PORT
29+
ASIO_SEPARATE_COMPILATION
30+
ASIO_STANDALONE
31+
ASIO_HAS_PTHREADS
32+
OPENSSL_NO_ENGINE
33+
)
34+
35+
if(NOT CONFIG_COMPILER_CXX_EXCEPTIONS)
36+
target_compile_definitions(${COMPONENT_LIB} PUBLIC ASIO_NO_EXCEPTIONS)
37+
endif()
3538

36-
target_link_libraries(${COMPONENT_LIB} PUBLIC ${wolflib})
37-
target_include_directories(${COMPONENT_LIB} PUBLIC ${wolfdir}/wolfssl/wolfssl)
38-
endif()
39+
if(NOT CONFIG_COMPILER_RTTI)
40+
target_compile_definitions(${COMPONENT_LIB} PUBLIC ASIO_NO_TYPEID)
41+
endif()
3942

40-
if(CONFIG_ASIO_USE_ESP_OPENSSL)
43+
if(CONFIG_ASIO_SSL_SUPPORT)
4144
idf_component_get_property(mbedtls mbedtls COMPONENT_LIB)
4245
target_link_libraries(${COMPONENT_LIB} PUBLIC ${mbedtls})
43-
endif()
4446
endif()

components/asio/Kconfig

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,6 @@ menu "ESP-ASIO"
66
default n
77
help
88
Enable support for basic SSL/TLS features, available for mbedTLS/OpenSSL
9-
as well as wolfSSL TLS library.
10-
11-
choice ASIO_SSL_LIBRARY_CHOICE
12-
prompt "Choose SSL/TLS library for ESP-TLS (See help for more Info)"
13-
default ASIO_USE_ESP_OPENSSL
14-
depends on ASIO_SSL_SUPPORT
15-
help
16-
The ASIO support multiple backend TLS libraries. Currently the mbedTLS with a thin ESP-OpenSSL
17-
port layer (default choice) and WolfSSL are supported.
18-
Different TLS libraries may support different features and have different resource
19-
usage. Consult the ESP-TLS documentation in ESP-IDF Programming guide for more details.
20-
config ASIO_USE_ESP_OPENSSL
21-
bool "esp-openssl"
22-
config ASIO_USE_ESP_WOLFSSL
23-
depends on TLS_STACK_WOLFSSL
24-
bool "wolfSSL (License info in wolfSSL directory README)"
25-
endchoice
269

2710
config ASIO_SSL_BIO_SIZE
2811
int "Size of BIO object"

components/asio/asio

Submodule asio updated 1579 files
Lines changed: 3 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,12 @@
11
/*
2-
* SPDX-FileCopyrightText: 2018-2022 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2018-2023 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66
#ifndef _ESP_ASIO_CONFIG_H_
77
#define _ESP_ASIO_CONFIG_H_
88

9-
//
10-
// Enabling exceptions only when they are enabled in menuconfig
11-
//
12-
# include <sdkconfig.h>
13-
# ifndef CONFIG_COMPILER_CXX_EXCEPTIONS
14-
# define ASIO_NO_EXCEPTIONS
15-
# endif // CONFIG_COMPILER_CXX_EXCEPTIONS
16-
17-
# ifndef CONFIG_COMPILER_RTTI
18-
# define ASIO_NO_TYPEID
19-
# endif // CONFIG_COMPILER_RTTI
20-
21-
//
22-
// Use system sockets
23-
//
24-
# include "sys/socket.h"
25-
26-
//
27-
// Specific ASIO feature flags
28-
//
29-
# define ASIO_DISABLE_SERIAL_PORT
30-
# define ASIO_SEPARATE_COMPILATION
31-
# define ASIO_STANDALONE
32-
# define ASIO_HAS_PTHREADS
33-
# define ASIO_DISABLE_CONCEPTS
34-
35-
# ifdef CONFIG_ASIO_USE_ESP_OPENSSL
36-
# define ASIO_USE_ESP_OPENSSL
37-
# define OPENSSL_NO_ENGINE
38-
# define ASIO_SSL_DETAIL_OPENSSL_TYPES_HPP
39-
# include "openssl_stub.hpp"
40-
41-
# elif CONFIG_ASIO_USE_ESP_WOLFSSL
42-
# define ASIO_USE_WOLFSSL
43-
# endif // CONFIG_ASIO_USE_ESP_OPENSSL
9+
#define ASIO_SSL_DETAIL_OPENSSL_TYPES_HPP
10+
#include "openssl_stub.hpp"
4411

4512
#endif // _ESP_ASIO_CONFIG_H_

0 commit comments

Comments
 (0)