Skip to content

Commit e63d4e3

Browse files
Merge pull request #370 from euripedesrocha/update_asio_128
Update asio to 1.28
2 parents 60d7145 + b310abe commit e63d4e3

File tree

16 files changed

+58
-114
lines changed

16 files changed

+58
-114
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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
dependencies:
22
## Required IDF version
33
idf: ">=5.0"
4-
espressif/asio: ">=1.0.1"
4+
espressif/asio:
5+
version: "^1.14.1"
6+
override_path: '../../../'
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
dependencies:
22
## Required IDF version
33
idf: ">=5.0"
4-
espressif/asio: ">=1.0.1"
4+
espressif/asio:
5+
version: "^1.14.1"
6+
override_path: '../../../'
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CONFIG_ESP_MAIN_TASK_STACK_SIZE=8192
2+
CONFIG_COMPILER_CXX_EXCEPTIONS=y
3+
4+
#
5+
# Partition Table
6+
#
7+
# Leave some room for larger apps without needing to reduce other features
8+
CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
dependencies:
22
## Required IDF version
33
idf: ">=5.0"
4-
espressif/asio: ">=1.0.1"
4+
espressif/asio:
5+
version: "^1.14.1"
6+
override_path: '../../../'
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
dependencies:
22
## Required IDF version
33
idf: ">=5.0"
4-
espressif/asio: ">=1.0.1"
4+
espressif/asio:
5+
version: "^1.14.1"
6+
override_path: '../../../'

components/asio/examples/ssl_client_server/sdkconfig.defaults

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ CONFIG_ASIO_SSL_SUPPORT=y
22
CONFIG_PARTITION_TABLE_CUSTOM=y
33
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv"
44
CONFIG_PARTITION_TABLE_FILENAME="partitions.csv"
5+
CONFIG_COMPILER_CXX_EXCEPTIONS=y
56

67
#
78
# Partition Table

0 commit comments

Comments
 (0)