feat(mbedtls): Add dynamic buffer and local resource managment to decrease SSL heap cost

This commit is contained in:
Dong Heng
2020-05-18 15:00:30 +08:00
parent 633322bad3
commit cfebde2081
8 changed files with 1234 additions and 2 deletions

View File

@@ -10,3 +10,22 @@ COMPONENT_OBJEXCLUDE := mbedtls/library/net_sockets.o
COMPONENT_SUBMODULES += mbedtls
ifdef CONFIG_MBEDTLS_DYNAMIC_BUFFER
WRAP_FUNCTIONS = mbedtls_ssl_handshake_client_step \
mbedtls_ssl_handshake_server_step \
mbedtls_ssl_read \
mbedtls_ssl_write \
mbedtls_ssl_session_reset \
mbedtls_ssl_free \
mbedtls_ssl_setup \
mbedtls_ssl_send_alert_message \
mbedtls_ssl_close_notify
WRAP_ARGUMENT := -Wl,--wrap=
COMPONENT_ADD_LDFLAGS = -l$(COMPONENT_NAME) $(addprefix $(WRAP_ARGUMENT),$(WRAP_FUNCTIONS))
COMPONENT_SRCDIRS += port/dynamic
endif