From b99f856e30561214669106cdf4f4dbc9999018ad Mon Sep 17 00:00:00 2001 From: Andy Green Date: Tue, 7 Apr 2026 15:26:41 +0100 Subject: [PATCH 1/2] testsfail: blow up on mac --- lib/secure-streams/serialized/client/sspc-transport.c | 1 + .../minimal-secure-streams-testsfail.c | 11 ++++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/secure-streams/serialized/client/sspc-transport.c b/lib/secure-streams/serialized/client/sspc-transport.c index 339a27cf79..4db6f6b78b 100644 --- a/lib/secure-streams/serialized/client/sspc-transport.c +++ b/lib/secure-streams/serialized/client/sspc-transport.c @@ -191,6 +191,7 @@ lws_sspc_txp_event_closed(lws_transport_priv_t priv) r = h->ssi.state(ss_to_userobj(h), NULL, LWSSSCS_DISCONNECTED, 0); } + h->creating_cb_done = 0; if (r != LWSSSSRET_DESTROY_ME) /* * schedule a reconnect in 1s diff --git a/minimal-examples-lowlevel/secure-streams/minimal-secure-streams-testsfail/minimal-secure-streams-testsfail.c b/minimal-examples-lowlevel/secure-streams/minimal-secure-streams-testsfail/minimal-secure-streams-testsfail.c index acc87b99f2..98bc757f06 100644 --- a/minimal-examples-lowlevel/secure-streams/minimal-secure-streams-testsfail/minimal-secure-streams-testsfail.c +++ b/minimal-examples-lowlevel/secure-streams/minimal-secure-streams-testsfail/minimal-secure-streams-testsfail.c @@ -427,7 +427,7 @@ static const char * const default_ss_policy = "\"tls\": true," "\"nghttp2_quirk_end_stream\": true," "\"h2q_oflow_txcr\": true," - "\"timeout_ms\": 3000," + "\"timeout_ms\": 5000," "\"retry\": \"default\"," "\"tls_trust_store\": \"le_via_isrg\"" "}}" @@ -591,19 +591,19 @@ struct tests_seq { { "h1:badcert_hostname", - "badcert_hostname", 6 * LWS_US_PER_SEC, LWSSSCS_ALL_RETRIES_FAILED, + "badcert_hostname", 35 * LWS_US_PER_SEC, LWSSSCS_ALL_RETRIES_FAILED, (1 << LWSSSCS_QOS_NACK_REMOTE), 0 }, { "h1:badcert_expired", - "badcert_expired", 6 * LWS_US_PER_SEC, LWSSSCS_ALL_RETRIES_FAILED, + "badcert_expired", 35 * LWS_US_PER_SEC, LWSSSCS_ALL_RETRIES_FAILED, (1 << LWSSSCS_QOS_NACK_REMOTE), 0 }, { "h1:badcert_selfsigned", - "badcert_selfsigned", 6 * LWS_US_PER_SEC, LWSSSCS_ALL_RETRIES_FAILED, + "badcert_selfsigned", 35 * LWS_US_PER_SEC, LWSSSCS_ALL_RETRIES_FAILED, (1 << LWSSSCS_QOS_NACK_REMOTE), 0 }, @@ -737,7 +737,8 @@ myss_state(void *userobj, void *sh, lws_ss_constate_t state, case LWSSSCS_CONNECTING: case LWSSSCS_CREATING: if (state == LWSSSCS_CREATING) { - m->start_us = lws_now_usecs(); + if (!m->start_us) + m->start_us = lws_now_usecs(); lws_ss_start_timeout(m->ss, (unsigned int)(curr_test->timeout_us / LWS_US_PER_MS)); } else { From ba8e0c713bba3ca7a60c1fcc945928a2b3567421 Mon Sep 17 00:00:00 2001 From: Henri Menke Date: Wed, 8 Apr 2026 13:19:01 +0200 Subject: [PATCH 2/2] Only add targets to LIBWEBSOCKETS_LIBRARIES when they exist --- cmake/libwebsockets-config.cmake.in | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cmake/libwebsockets-config.cmake.in b/cmake/libwebsockets-config.cmake.in index 19e2704438..b91c58e530 100644 --- a/cmake/libwebsockets-config.cmake.in +++ b/cmake/libwebsockets-config.cmake.in @@ -18,7 +18,13 @@ endif() include(${LWS_CMAKE_DIR}/LwsCheckRequirements.cmake) # IMPORTED targets from LibwebsocketsTargets.cmake -set(LIBWEBSOCKETS_LIBRARIES websockets websockets_shared) +set(LIBWEBSOCKETS_LIBRARIES) +if (TARGET websockets) + set(LIBWEBSOCKETS_LIBRARIES ${LIBWEBSOCKETS_LIBRARIES} websockets) +endif() +if (TARGET websockets_shared) + set(LIBWEBSOCKETS_LIBRARIES ${LIBWEBSOCKETS_LIBRARIES} websockets_shared) +endif() if (TARGET websockets_shared) set(websockets_shared 1)