Skip to content

Commit

Permalink
Update lws version (#1820)
Browse files Browse the repository at this point in the history
* 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 d94a3da.

* Revert "Trying a windows friendly patch file"

This reverts commit a6c7de2.

* Revert "Remove newline in the patch file"

This reverts commit 9e5d47e.

* 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 83f104b.

* WINDOW_UPDATE failure on mbedtls, enable an option

* Revert to 4.3.2 to check if mbedtls passes there

* Disable alpn
  • Loading branch information
disa6302 authored Dec 26, 2023
1 parent 4460ec7 commit 55b027f
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions CMake/Dependencies/libwebsockets-CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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 |
Expand Down
45 changes: 18 additions & 27 deletions CMake/Dependencies/libwebsockets-old-gcc-fix-cast-cmakelists.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

2 changes: 2 additions & 0 deletions configs/config_mbedtls.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down
1 change: 0 additions & 1 deletion src/source/PeerConnection/Rtcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down

0 comments on commit 55b027f

Please sign in to comment.