From 55b027fb3f86221ff402fe594673cb631768b2b3 Mon Sep 17 00:00:00 2001 From: Divya Sampath Kumar Date: Tue, 26 Dec 2023 13:57:12 -0500 Subject: [PATCH] Update lws version (#1820) * Update lws version * Remove patch * Use old gcc patch * Old gcc patch update * Fix windows patching failure * Add verbose logging for patch failure * Remove newline in the patch file * Trying a windows friendly patch file * Move to another patch file * Revert "Move to another patch file" This reverts commit d94a3da44226e10164f03d99a26e7eb699459055. * Revert "Trying a windows friendly patch file" This reverts commit a6c7de25bfbf756301b17db888ede803fbfd0a8a. * Revert "Remove newline in the patch file" This reverts commit 9e5d47e463271626684b0e0a335d0e2bc00d6e0c. * Windows patch fix * Update to 4.3.3 * Reintro gcc patch for lws_map * Rebase develop * DTLS API test * Revert "DTLS API test" This reverts commit 83f104b2bc53305d35fc7ca3e8bfa9a08ebcc924. * WINDOW_UPDATE failure on mbedtls, enable an option * Revert to 4.3.2 to check if mbedtls passes there * Disable alpn --- .github/workflows/ci.yml | 2 +- .../Dependencies/libwebsockets-CMakeLists.txt | 4 +- ...bsockets-old-gcc-fix-cast-cmakelists.patch | 45 ++++++++----------- configs/config_mbedtls.h | 2 + src/source/PeerConnection/Rtcp.c | 1 - 5 files changed, 23 insertions(+), 31 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 178833ee7a..7fcfd6508a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -521,7 +521,7 @@ jobs: shell: powershell run: | $env:Path += ';C:\webrtc\open-source\bin;C:\tools\pthreads-w32-2-9-1-release\Pre-built.2\dll\x64;C:\webrtc\build' - & "C:\webrtc\build\tst\webrtc_client_test.exe" --gtest_filter="-DataChannelFunctionalityTest.*:IceApiTest.*:IceFunctionalityTest.*:PeerConnectionFunctionalityTest.*:SignalingApiFunctionalityTest.*:TurnConnectionFunctionalityTest.*:RtpFunctionalityTest.marshallUnmarshallH264Data:RtpFunctionalityTest.packingUnpackingVerifySameH264Frame:RtcpFunctionalityTest.onRtcpPacketCompound:RtcpFunctionalityTest.twcc3" + & "C:\webrtc\build\tst\webrtc_client_test.exe" --gtest_filter="-DataChannelFunctionalityTest.*:DtlsApiTest.*:IceApiTest.*:IceFunctionalityTest.*:PeerConnectionFunctionalityTest.*:SignalingApiFunctionalityTest.*:TurnConnectionFunctionalityTest.*:RtpFunctionalityTest.marshallUnmarshallH264Data:RtpFunctionalityTest.packingUnpackingVerifySameH264Frame:RtcpFunctionalityTest.onRtcpPacketCompound:RtcpFunctionalityTest.twcc3" # windows-msvc-mbedtls: # runs-on: windows-2022 # env: diff --git a/CMake/Dependencies/libwebsockets-CMakeLists.txt b/CMake/Dependencies/libwebsockets-CMakeLists.txt index 90bec7d553..6ce4f28fec 100644 --- a/CMake/Dependencies/libwebsockets-CMakeLists.txt +++ b/CMake/Dependencies/libwebsockets-CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.6.3) project(libwebsocket-download NONE) -SET(PATCH_COMMAND git apply --ignore-whitespace ${CMAKE_CURRENT_LIST_DIR}/libwebsockets-old-gcc-fix-cast-cmakelists.patch ${CMAKE_CURRENT_LIST_DIR}/libwebsockets-leak-pipe-fix.patch) +SET(PATCH_COMMAND git apply --verbose --ignore-whitespace ${CMAKE_CURRENT_LIST_DIR}/libwebsockets-old-gcc-fix-cast-cmakelists.patch) include(ExternalProject) if (BUILD_STATIC_LIBS) @@ -30,7 +30,7 @@ endif() ExternalProject_Add(project_libwebsockets GIT_REPOSITORY https://github.com/warmcat/libwebsockets.git - GIT_TAG v4.2.2 + GIT_TAG v4.3.3 PATCH_COMMAND ${PATCH_COMMAND} PREFIX ${CMAKE_CURRENT_BINARY_DIR}/build LIST_SEPARATOR | diff --git a/CMake/Dependencies/libwebsockets-old-gcc-fix-cast-cmakelists.patch b/CMake/Dependencies/libwebsockets-old-gcc-fix-cast-cmakelists.patch index 61e25e8a35..6fd33a5bef 100644 --- a/CMake/Dependencies/libwebsockets-old-gcc-fix-cast-cmakelists.patch +++ b/CMake/Dependencies/libwebsockets-old-gcc-fix-cast-cmakelists.patch @@ -11,31 +11,22 @@ index 68629e6f..6ef628b8 100644 prev = h2n->hpack_pos; h2n->hpack_pos = (uint16_t)huftable_decode( (int)h2n->hpack_pos, b); -diff --git a/lib/tls/CMakeLists.txt b/lib/tls/CMakeLists.txt -index b214df75..06eaf255 100644 ---- a/lib/tls/CMakeLists.txt -+++ b/lib/tls/CMakeLists.txt -@@ -57,10 +57,10 @@ if (LWS_WITH_BORINGSSL) - endif() +diff --git a/lib/core/lws_map.c b/lib/core/lws_map.c +index d149d86752..b319d79f49 100644 +--- a/lib/core/lws_map.c ++++ b/lib/core/lws_map.c +@@ -29,11 +29,11 @@ typedef struct lws_map_hashtable { + lws_dll2_owner_t ho; + } lws_map_hashtable_t; - if (LWS_WITH_SSL AND NOT LWS_WITH_WOLFSSL AND NOT LWS_WITH_MBEDTLS) -- if ("${LWS_OPENSSL_LIBRARIES}" STREQUAL "" OR "${LWS_OPENSSL_INCLUDE_DIRS}" STREQUAL "") -+ if (("${LWS_OPENSSL_LIBRARIES}" STREQUAL "" AND ("${LWS_OPENSSL_SSL_LIBRARY}" STREQUAL "" OR "${LWS_OPENSSL_CRYPTO_LIBRARY}" STREQUAL "")) OR "${LWS_OPENSSL_INCLUDE_DIRS}" STREQUAL "") - else() - if (NOT LWS_PLAT_FREERTOS) -- set(OPENSSL_LIBRARIES ${LWS_OPENSSL_LIBRARIES}) -+ list(APPEND OPENSSL_LIBRARIES ${LWS_OPENSSL_LIBRARIES} ${LWS_OPENSSL_SSL_LIBRARY} ${LWS_OPENSSL_CRYPTO_LIBRARY}) - endif() - set(OPENSSL_INCLUDE_DIRS ${LWS_OPENSSL_INCLUDE_DIRS}) - set(OPENSSL_FOUND 1) -@@ -248,7 +248,9 @@ if (LWS_WITH_SSL) - find_package(PkgConfig QUIET) - pkg_check_modules(PC_OPENSSL openssl QUIET) - find_package(OpenSSL REQUIRED) -- list(APPEND OPENSSL_LIBRARIES ${PC_OPENSSL_LIBRARIES}) -+ if (NOT LWS_WITH_STATIC) -+ list(APPEND OPENSSL_LIBRARIES ${PC_OPENSSL_LIBRARIES}) -+ endif() - set(OPENSSL_LIBRARIES ${OPENSSL_LIBRARIES} PARENT_SCOPE) - endif() - set(OPENSSL_INCLUDE_DIRS "${OPENSSL_INCLUDE_DIR}") +-typedef struct lws_map { ++struct lws_map { + lws_map_info_t info; + + /* array of info.modulo x lws_map_hashtable_t overallocated */ +-} lws_map_t; ++}; + + typedef struct lws_map_item { + lws_dll2_t list; /* owned by hashtable */ + diff --git a/configs/config_mbedtls.h b/configs/config_mbedtls.h index 52cc0ab10f..a642be21dc 100644 --- a/configs/config_mbedtls.h +++ b/configs/config_mbedtls.h @@ -19,6 +19,8 @@ extern "C" { #undef MBEDTLS_ECP_DP_SECP224K1_ENABLED #undef MBEDTLS_ECP_DP_SECP256K1_ENABLED +#undef MBEDTLS_SSL_ALPN + /** * \def MBEDTLS_ENTROPY_HARDWARE_ALT * diff --git a/src/source/PeerConnection/Rtcp.c b/src/source/PeerConnection/Rtcp.c index bbf6e73927..00cb71263a 100644 --- a/src/source/PeerConnection/Rtcp.c +++ b/src/source/PeerConnection/Rtcp.c @@ -340,7 +340,6 @@ STATUS onRtcpPacket(PKvsPeerConnection pKvsPeerConnection, PBYTE pBuff, UINT32 b UINT32 currentOffset = 0; CHK(pKvsPeerConnection != NULL && pBuff != NULL, STATUS_NULL_ARG); - DLOGD("**rtcp**"); while (currentOffset < buffLen) { CHK_STATUS(setRtcpPacketFromBytes(pBuff + currentOffset, buffLen - currentOffset, &rtcpPacket));