mirror of
https://github.com/raspberrypi/pico-sdk.git
synced 2025-04-23 17:42:39 +00:00
Fix LwIP file altcp_tls_mbedtls.c
altcp_tls_mbedtls.c is not compatible with mbedtls 3.x so use a patched version until this is resolved. Make sure MBEDTLS_VERSION_MAJOR is visible to LwIP.
This commit is contained in:
parent
e15c80dfdc
commit
a33f2d376d
@ -127,9 +127,9 @@ if (NOT PICO_BARE_METAL)
|
|||||||
pico_add_subdirectory(rp2_common/pico_async_context)
|
pico_add_subdirectory(rp2_common/pico_async_context)
|
||||||
pico_add_subdirectory(rp2_common/pico_btstack)
|
pico_add_subdirectory(rp2_common/pico_btstack)
|
||||||
pico_add_subdirectory(rp2_common/pico_cyw43_driver)
|
pico_add_subdirectory(rp2_common/pico_cyw43_driver)
|
||||||
|
pico_add_subdirectory(rp2_common/pico_mbedtls)
|
||||||
pico_add_subdirectory(rp2_common/pico_lwip)
|
pico_add_subdirectory(rp2_common/pico_lwip)
|
||||||
pico_add_subdirectory(rp2_common/pico_cyw43_arch)
|
pico_add_subdirectory(rp2_common/pico_cyw43_arch)
|
||||||
pico_add_subdirectory(rp2_common/pico_mbedtls)
|
|
||||||
|
|
||||||
pico_add_subdirectory(rp2_common/pico_time_adapter)
|
pico_add_subdirectory(rp2_common/pico_time_adapter)
|
||||||
|
|
||||||
|
@ -235,14 +235,29 @@ if (EXISTS ${PICO_LWIP_PATH}/${LWIP_TEST_PATH})
|
|||||||
${PICO_LWIP_PATH}/src/apps/tftp/tftp.c
|
${PICO_LWIP_PATH}/src/apps/tftp/tftp.c
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
# Mbed TLS files
|
# Mbed TLS files
|
||||||
pico_add_library(pico_lwip_mbedtls NOFLAG)
|
pico_add_library(pico_lwip_mbedtls NOFLAG)
|
||||||
target_sources(pico_lwip_mbedtls INTERFACE
|
target_sources(pico_lwip_mbedtls INTERFACE
|
||||||
${PICO_LWIP_PATH}/src/apps/altcp_tls/altcp_tls_mbedtls.c
|
|
||||||
${PICO_LWIP_PATH}/src/apps/altcp_tls/altcp_tls_mbedtls_mem.c
|
${PICO_LWIP_PATH}/src/apps/altcp_tls/altcp_tls_mbedtls_mem.c
|
||||||
${PICO_LWIP_PATH}/src/apps/snmp/snmpv3_mbedtls.c
|
${PICO_LWIP_PATH}/src/apps/snmp/snmpv3_mbedtls.c
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# altcp_tls_mbedtls.c is not compatible with mbedtls 3.x so use a patched version until this is resolved
|
||||||
|
# See https://savannah.nongnu.org/patch/index.php?10448
|
||||||
|
if (MBEDTLS_VERSION_MAJOR AND MBEDTLS_VERSION_MAJOR GREATER_EQUAL 3)
|
||||||
|
target_sources(pico_lwip_mbedtls INTERFACE
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/altcp_tls_mbedtls.c
|
||||||
|
)
|
||||||
|
target_include_directories(pico_lwip_mbedtls INTERFACE
|
||||||
|
${PICO_LWIP_PATH}/src/apps/altcp_tls
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
target_sources(pico_lwip_mbedtls INTERFACE
|
||||||
|
${PICO_LWIP_PATH}/src/apps/altcp_tls/altcp_tls_mbedtls.c
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
# MQTT client files
|
# MQTT client files
|
||||||
pico_add_library(pico_lwip_mqtt NOFLAG)
|
pico_add_library(pico_lwip_mqtt NOFLAG)
|
||||||
target_sources(pico_lwip_mqtt INTERFACE
|
target_sources(pico_lwip_mqtt INTERFACE
|
||||||
|
1399
src/rp2_common/pico_lwip/altcp_tls_mbedtls.c
Normal file
1399
src/rp2_common/pico_lwip/altcp_tls_mbedtls.c
Normal file
File diff suppressed because it is too large
Load Diff
@ -16,7 +16,7 @@ if (EXISTS ${PICO_MBEDTLS_PATH}/${MBEDTLS_TEST_PATH})
|
|||||||
|
|
||||||
pico_register_common_scope_var(PICO_MBEDTLS_PATH)
|
pico_register_common_scope_var(PICO_MBEDTLS_PATH)
|
||||||
|
|
||||||
# We use version 2.28.8. But this should build version 3.5.1
|
# Support version 2.28.8 or 3.6.2
|
||||||
if (NOT MBEDTLS_VERSION_MAJOR)
|
if (NOT MBEDTLS_VERSION_MAJOR)
|
||||||
if (EXISTS ${PICO_MBEDTLS_PATH}/library/ssl_cli.c)
|
if (EXISTS ${PICO_MBEDTLS_PATH}/library/ssl_cli.c)
|
||||||
set(MBEDTLS_VERSION_MAJOR 2)
|
set(MBEDTLS_VERSION_MAJOR 2)
|
||||||
@ -25,6 +25,7 @@ if (EXISTS ${PICO_MBEDTLS_PATH}/${MBEDTLS_TEST_PATH})
|
|||||||
else()
|
else()
|
||||||
message(WARNING "Cannot determine the version of mbedtls")
|
message(WARNING "Cannot determine the version of mbedtls")
|
||||||
endif()
|
endif()
|
||||||
|
pico_register_common_scope_var(MBEDTLS_VERSION_MAJOR)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(src_crypto
|
set(src_crypto
|
||||||
|
Loading…
x
Reference in New Issue
Block a user