Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
275 commits
Select commit Hold shift + click to select a range
55a7c6a
http: sse: check POLLIN during DOING_TRANSACTION
lws-team Oct 16, 2021
50f7bd4
logs: unconvert adns wsi deref after potential close
lws-team Oct 16, 2021
36af266
adns: fix label limit check
lws-team Oct 16, 2021
d77a6c3
client: connect_check fail just log once
lws-team Oct 19, 2021
9efc32a
plugins: sshd: sc25519 must handle last bit
orefkov Oct 19, 2021
957bfae
plugins: sshd: mbedtls 3 extra adaptation
orefkov Oct 18, 2021
6c7798e
plugins: sshd: channel fixes
orefkov Oct 18, 2021
e9c92ec
metrics: ss: skip tagging if no ss streamtypename
Oct 19, 2021
63db023
pugins: sshd: handle window-change request
orefkov Oct 19, 2021
b43f90a
ss: policy: adaptations for dynamic policy
Oct 21, 2021
1a69afa
raw-file: clear POLLOUT before handling
lws-team Oct 24, 2021
26f5cb7
docs: client: Add UNIX socket connection notes for clients
FGasper Oct 25, 2021
00b7fa2
plat: freertos: selectively use old service looping
Oct 25, 2021
b843c09
mqtt: allow indicating username and password are not on heap
Oct 27, 2021
b912958
cmake: bring tls include requirement out as PUBLIC
lws-team Oct 28, 2021
7451ce5
server: SO_REUSEPORT: enable with LWS_MAX_SMP > 1
ronf Oct 30, 2021
c0f324f
esp32-c3dev: remove stray ssd1306 copy
lws-team Oct 29, 2021
4935fe9
openssl: remove lws_ssl_get_error_string as cruft
lws-team Oct 29, 2021
0c8dbad
examples-lowlevel: ws-server: pvo for WITH_PLUGINS
lws-team Nov 2, 2021
972f154
examples-lowlevel: ws client: add -n to README table
hannesa2 Nov 1, 2021
897eb02
plugins: sshd: eg musl needs sys/types if available
Nov 4, 2021
c42c2ad
retry: handle empty retry table
lws-team Nov 6, 2021
433ad32
docs: audit api return information
PeiweiHu Nov 7, 2021
7882a6d
jit-trust: clean after failed mbedtls_x509_get_name
lws-team Nov 8, 2021
240cd55
jit-trust: show coverity we handle NULL attribute source
lws-team Nov 8, 2021
57c5a0d
jit-trust: SAN_RFC822_NAME needs other_name union member
lws-team Nov 8, 2021
39380ff
client: connect: confirm we have a protocol
lws-team Nov 8, 2021
a00703f
unix-sockets: NOP for coverity
lws-team Nov 8, 2021
6e9c25d
mbedtls-x509: coverity: remove needless check
lws-team Nov 8, 2021
b0cd8f6
ss-h1: coverity: add needless header NULL check
lws-team Nov 8, 2021
11ba0b7
adopt: coverity: add pointless vh NULL check
lws-team Nov 8, 2021
b415f59
ss-deserialize: add pointless h NULL check
lws-team Nov 8, 2021
1db45d1
h2: coverity: check for OOM on dynamic table alloc
lws-team Nov 8, 2021
f9fc45b
sspc: proxy: coverity: handle unknown metadata name
lws-team Nov 8, 2021
3e1a1a4
coverity: client_reset: no longer any way to get NULL *pwsi
lws-team Oct 17, 2021
f8a21fe
adopt: coverity: move vh deref until after pointless check
lws-team Nov 9, 2021
cab3480
wsimux: immortal: only process immortality once per stream
Nov 8, 2021
b45dfcb
windows: mingw file type is int
lws-team Nov 7, 2021
3ef446f
freertos-service: remove cruft
lws-team Nov 9, 2021
121dd5e
ss: revert make ss timeout handle underlying wsi gone
lws-team Nov 9, 2021
bc83a57
h2: post: do not try to bind origin for files
lws-team Nov 17, 2021
eba4f8c
http: remove stray debug log
lws-team Nov 11, 2021
b0b7fff
android: fix extra warnings on android-resolv
Nov 10, 2021
c182871
mqtt: always init wildcard and shadow
Nov 15, 2021
d42a790
ws: client: fail server link if masked
lws-team Nov 10, 2021
c295f80
extpoll: make sure DEL_POLL_FD only coming once
Nov 22, 2021
741cf67
windows: mingw file type is int (v2)
lws-team Nov 7, 2021
0dc0f92
http proxy: support PUT, PATCH and DELETE methods
Nov 29, 2021
122cf59
docs: decruft README.coding
lws-team Nov 29, 2021
0bc5b58
http: cookie_get
Dec 2, 2021
91da9e3
cancel pipe: mark close when wsi is close
lws-team Dec 8, 2021
e529720
http: proxying: allow for large headers
Dec 13, 2021
7aaa877
docs: lws_service_tsi
chill1n Dec 13, 2021
141ebf3
service: make sure to sleep if nothing to do
liberize Dec 14, 2021
9cd7438
qnx: toolchain file and adaptations
Dec 15, 2021
f2e4327
esp32: update against Dec 21 idf
lws-team Dec 18, 2021
0d9acf7
http: redirect: keep ssl options at redirect
lws-team Dec 23, 2021
d90361b
cmake: fix compilation with OpenSSL subproject
fgerlits Jan 10, 2022
10a34fc
coverity fixes
lws-team Jan 10, 2022
a352b9b
http: access_log: fix nwsi check
lws-team Jan 15, 2022
91f0b3b
sort-dns: fix scope comparison
lws-team Jan 16, 2022
637ed90
http: lws_add_http_header_by_name: add colon if needed
yogpstop Jan 27, 2022
f99bf77
logs: openssl session: improve detection of INFO enabled
lws-team Jan 21, 2022
310c8ba
logs: lock log context refcount changes
lws-team Jan 25, 2022
1b77c2f
coverity: change ss handle priv style
lws-team Jan 28, 2022
b709d50
coverity: mark false positive
lws-team Jan 28, 2022
1f9925b
genec: show correct nid when not allowed
neheb Feb 1, 2022
939a512
mbedtls: improve api detection
lws-team Feb 1, 2022
bb759fd
route: fix nl groups and local ipv6 ads
Feb 2, 2022
eda299b
ss: mqtt: fix wrong QoS value on Birth message
Feb 3, 2022
7e3125b
minimal: ss: policy2c: add more MQTT related fields
Feb 3, 2022
a80fbeb
ss: mqtt: add support for retained message
Feb 5, 2022
1027d3a
ss: http: ensure SS points to wsi when using wsi pointing to SS
lws-team Feb 9, 2022
3eae5f8
ss: reject direct protocol metadata if NULL ss wsi
lws-team Feb 9, 2022
3f19d94
jit-trust: adapt for esp-idf pre v3 mbedtls
lws-team Feb 4, 2022
c7e82fb
ss: http: unreachable superfluous if we did DISCONNECTED
lws-team Feb 4, 2022
8111d47
cmake: remove duplicate LwsCheckRequirements
lws-team Feb 7, 2022
ab7ce50
http: proxy server: move C99 VLA to heap
lws-team Feb 7, 2022
ca3f639
tls: libressl: refactor set_options to work with macro implementations
xoxoooooo Feb 8, 2022
8907660
ss: avoid POLL-POLL transition
lws-team Feb 10, 2022
8d560a5
ss: POLL to all retries failed is possible
lws-team Feb 10, 2022
0033acc
lejp-conf: provide matches for block start paths
lws-team Feb 9, 2022
28b1e1f
mingw: correct winsock recv() and send() buffer ptr type
Feb 14, 2022
027fe42
h1: deal with WAITING_CONNECT in ops-h1
lws-team Feb 11, 2022
fcde566
cgi: gracefully handle missing wsi->http.cgi
lws-team Feb 11, 2022
4fb9a53
route: extend lws_route_uidx_t from 1 byte to 2 bytes
wayneonway Feb 21, 2022
1f2912d
pkgconfig: use appropriate static lib name
lws-team Feb 17, 2022
058f97e
netlink: always delete route if it exists
lws-team Feb 18, 2022
8b6f2d5
gcc4: conceal typedef in public header
lws-team Feb 18, 2022
89f489f
plugins: openmetrics_export: graceful fail if unconfigured
lws-team Feb 21, 2022
15db074
context_destroy: clean up early fail path
lws-team Feb 21, 2022
49af374
mbedtls: v3.1 reverts privacy of mbedtls_net_context fd
lws-team Feb 22, 2022
2cf7e0f
coverity: 2021-12-1 uplevel fixes
lws-team Feb 23, 2022
8782a47
gcc12: fix potential test app string overflow
lws-team Feb 23, 2022
b923910
esp32: heltec: change delay
lws-team Feb 24, 2022
db5f574
nsc: fall back to internal headers when no stash
lws-team Mar 1, 2022
69e1507
logs: freertos adds free heap to all logs
lws-team Mar 6, 2022
f8e3d09
cmake: fix FindOpenSSLbins error when no OpenSSL executable found
DerBer Mar 8, 2022
995a759
h1: remove assert on unexpected POLLIN state just hangup
lws-team Mar 10, 2022
02f7e06
sul: add clear advice for zombie suls
lws-team Mar 14, 2022
3d98e29
raw: tls conns
lws-team Jan 25, 2022
e5d73be
windows: avoid NULL addr on connect check
Apr 2, 2022
1004419
logs: use finegrained level test on unix-sockets.c
lws-team Apr 3, 2022
a7f2e29
client: connect report actual socket error to user callback rather th…
FGasper Oct 15, 2021
3268db0
cmake: msvc: avoid having to use both preprocessor flags
Apr 5, 2022
ec81f53
netlink: route handling checks for SRC when it means DST
wayneonway Apr 6, 2022
88a4005
docs: fix typo
PerBothner Apr 10, 2022
cad13a8
acme: update for v2
Apr 11, 2022
9e658fa
threadpool: improve relationship with LWS_HAVE_PTHREAD_H
lws-team Apr 11, 2022
6108d68
h2: access log: POST: prepare log
Apr 11, 2022
fe0a5b8
mqtt: fix wrong awsiot field set on SUBSCRIBE
Apr 8, 2022
a51d356
ss: mqtt: set the CONNECTED state after Birth
Apr 9, 2022
21baf47
ss: mqtt: add QOS_NACK_REMOTE state on PUBLISH failure
Apr 9, 2022
8eb6cbf
minimal: ss: policy2c: update MQTT fields
Apr 9, 2022
fe762e5
CMakeLists.txt: fix build without C++
ffontaine Apr 13, 2022
6e997a9
tls: cmake: add wolfssl pkg-config support
ffontaine Apr 14, 2022
e02aaff
gcc12: extend test-client buffer for dumb increment
lws-team Apr 17, 2022
65870eb
windows: plugins uv fixes
Apr 19, 2022
cf7862d
plat: esp32: Remove esp_attr.h file
hmalpani Apr 21, 2022
2d48f55
mbedtls: some versions need x509 overallocation
lws-team Apr 21, 2022
c398dd5
coverity: reorder NULL check
lws-team Apr 29, 2022
8b1693a
ss: mqtt: add support for AWS IoT Shadow topic
Apr 29, 2022
71db363
ss: mqtt: remove c99isms and fix types
lws-team May 3, 2022
310abdd
coverity: ss: mqtt: remove needless wsi check
lws-team May 4, 2022
bfd921d
clean: remove needless LWS_PRE
nick87720z May 3, 2022
6d8a798
validity: fix bad pointer access
SevastianovAndrii May 3, 2022
5a008cf
http: compression: fix selection
OurEra May 4, 2022
b0a749c
v4.3.2
lws-team May 17, 2022
ebabf49
http: server: mounts: dont assume Basic Auth if no FILE_OPS
lws-team Feb 13, 2022
fe10705
http: server: correct plugin name in error
Jun 14, 2022
754d2b4
eventloop: windows: ssl: remove spin
zbroyar Jun 14, 2022
065035e
windows: client connect: use sockaddr size
jaumeMA Jun 14, 2022
a5f81f8
lib/tls/CMakeLists.txt: fix build without threads
ffontaine May 28, 2022
a723789
test-apps: use correct EXTERNAL_POLL flag
Jun 17, 2022
5a8f790
logs: setup earlier so we can use on fail path
Jun 29, 2022
ee2e407
spa: file upload fix
marcograt Jul 4, 2022
ea3a0ab
windows: zlib: internal lib doesnt need find_package
lws-team Jul 6, 2022
0a5526b
ws: tell caller we closed wsi on handshake failure
Jul 12, 2022
50ed521
From aa990b1451e87f2ad221b0a1a7ebfc0b1f369292 Mon Sep 17 00:00:00 2001
ammarfaizi2 Jun 22, 2022
9bfca5b
From a966322704e47a4f7af4f750a712ea26c9901174 Mon Sep 17 00:00:00 2001
Arenoros Jun 30, 2022
ba84a1d
Subject: [PATCH] platorm windows-sockets: treat WSAEWOULDBLOCK as
bogdad Aug 5, 2022
39f6379
vhost: remove from defer binding on destroy
dmpot Mar 16, 2022
8796dc0
windows: allow serving files open for write
Aug 23, 2022
58af7b4
From df9761a261b5c3286ba5ff079ee77e88de8b9ed8 Mon Sep 17 00:00:00 2001
dhobsong Aug 16, 2022
937a8db
tests: disable tests with jig rot
lws-team Sep 18, 2022
12250cf
openssl3: change deprecated warnings suppression
dmpot Sep 15, 2022
41ff4ef
openssl-server: enum vs int disagreement
lws-team Jun 14, 2023
c012b12
openssl: Properly report OpenSSL error in lws_tls_client_connect
audricschiltknecht Oct 20, 2023
051dfbd
openssl: Add lws ctx ref to client vhost's SSL_CTX
nkarstens Oct 20, 2023
6dfc270
ss: http: support PATCH
lws-team Oct 27, 2023
75b41f4
tls: mbedtls-3.5.0: correct privkey size
lws-team Nov 5, 2023
5a5c313
mbedtls: print library version
lws-team Nov 2, 2023
cf07fef
msvc: avoid error about mixed ellipsis and cond
Nov 7, 2023
5e060e2
mbedtls: auto adapt to changed session constant
lws-team Oct 31, 2023
115571f
cmake: mbedtls: mbedtls_ssl_conf_alpn_protocols check
lws-team Nov 2, 2023
e7db2ef
mbedtls: if we have tls1.2 only accept exactly that
lws-team Nov 2, 2023
08ee6f1
clean: gcc13 false positive uninitialized
Nov 10, 2023
ac9e3ba
b64: lws_b64_decode_stateful truncates response
darhaywa Mar 23, 2023
c097a44
pmd: fix ws parser for non pmd packet with pmd ext enabled
edwardz-prestolabs Apr 24, 2023
7b5a070
pt_destroy: possible leaking pipe side
Oct 19, 2022
3179273
server: Always return result of _lws_vhost_init_server_af
tjwalton Sep 29, 2022
8a190f2
libuv: fix idle being stopped when there is still pending stuff
lonnywong Nov 16, 2023
59d42bc
gcc: fix mbedtls missing enum
kraj Jan 27, 2023
cd8fb61
windows: evade unused var warnings when logs disabled
orgads Nov 18, 2023
96dffe8
cmake: ssl lib paths
zzblydia Nov 18, 2023
4415e84
v4.3.3
lws-team Nov 20, 2023
eba1e4a
pmd: fix buffer being reused while draining extensions
lonnywong Nov 21, 2023
f8eac4e
mbedtls: dont rely on potentially missing version api
Nov 21, 2023
0c1a090
Subject: sul: Update README.lws_sul.md
inobelar Nov 23, 2023
bfa67ec
pmd: revert #3014 and drain extensions before next ssl read
lonnywong Nov 22, 2023
be47305
License: Fix typo in MIT text in fsmount.c
pombredanne Nov 27, 2023
881a0ac
lecp: fix format_scan function for numeric longer than 2 digits and n…
Ddom952 Jan 8, 2024
ab683ca
ev: remove any watchers on close
dlundquist Jan 15, 2024
cd3869e
certinfo: fix unused var with NO_LOGS
lws-team Mar 1, 2024
5037503
genaes: fix lws_genaes_create comment
PJBoy Mar 6, 2024
0fd97f6
context: fall back if no build-time mbedtls version
liudongmiao Mar 7, 2024
893ff81
raw: connect callback can be triggered twice
liudongmiao Mar 7, 2024
130a446
wolfssl: fix build
liudongmiao Mar 3, 2024
6901c32
raw-skt: don't read more than rx_buffer_size
liudongmiao Mar 5, 2024
0a13216
h2: cleanly return if fd is -1 on custom close
lws-team Mar 8, 2024
eac4489
netlink: when binding the per-context socket, let the kernel choose t…
p-luke Mar 19, 2024
bd8f69e
smp: extend client to work with tsi
Apr 12, 2024
c90a77f
mbedtls: fix compile on mbedtls ge 3.6
orangepizza May 7, 2024
c571d22
windows: fix check of result of CreateFileW
Jun 4, 2024
ca375a4
client hs: fix segmentation fault
zzblydia Jun 24, 2024
b462ccd
ACME: fixes
jdarpinian Jun 24, 2024
7467274
cgi: setenv: remove equals from arg
Sep 23, 2024
8c8a2a5
lws_map: remove typedef for some toolchains
lws-team Sep 23, 2024
154bf55
openssl: allow custom SSL_CTX with GLOBAL_INIT unset
lws-team Sep 23, 2024
57a0c16
openbsd: disable HIGH_RELIABLITY socket option
lws-team Sep 25, 2024
3976131
unix-sockets: extra care around short for some toolchains
lws-team Sep 25, 2024
51c47da
without-server: adapt loops to not touch listen_list
lws-team Sep 25, 2024
86819f0
win32: upscale timeout_ms to 64-bit int
lws-team Sep 25, 2024
82c97d4
lws_extension_callback_pm_deflate: make visible
lws-team Sep 25, 2024
b05e95e
pipe: only pt destroy pipe close should close pipe fds
lws-team Sep 25, 2024
2ca5d86
ws: increase sanity check for spins needed to consume buffer to 100
lws-team Sep 25, 2024
8fc7596
event: blow error if runtime context options want eventlib we dont have
lws-team Sep 25, 2024
f7aeade
win: trigger context destroy if pt destroying itself
lws-team Sep 25, 2024
d1722af
check func munging
lws-team Sep 25, 2024
bad1866
wolfssl: have docs follow switch change
lws-team Sep 25, 2024
0981808
doc: session tickets
lws-team Sep 25, 2024
e24114f
win: file: use INVALID_HANDLE_VALUE directly
lws-team Sep 25, 2024
a1ee5a2
mbedtls: provide declaration if ge 3.5
lws-team Sep 29, 2024
a544db3
win32: zlib: Fix buffer overflow on inflate (CVE-2022-37434)
orgads Oct 2, 2024
dcf9dca
unix-file: Fix signed/unsigned implicit conversion
orgads Oct 2, 2024
0ee1984
win: change uid_t and gid_t from int to unsigned int
orgads Oct 2, 2024
8ad16af
win: simplify error logging in windows-sockets.c
orgads Oct 1, 2024
5102a5c
tls-sessions: Pass correct type for printf %u
orgads Oct 2, 2024
a71a62f
mbedtls: fix issue about memory leak
baldwin-law Nov 5, 2024
c4b1e34
clean: var unused when no logs
orgads Oct 27, 2024
12e52ae
test-server-extpoll: remove LWS_WITH_EXTERNAL_POLL redefine
aphage Jan 2, 2024
dc65edd
spa: use sized local info rather than incoming
lws-team Dec 13, 2024
c6e9792
lejp: E implies float
ribes96 Jan 10, 2025
e5506ad
mbedtls: translate error codes for caller
Jan 19, 2025
fce734f
coverity 472862: cookiejar overflow
lws-team Jan 16, 2025
5a34404
coverity 872858: hash gen overflow false positive
lws-team Jan 16, 2025
b81b24d
coverity 472863: cookies: length check order wrong
lws-team Jan 16, 2025
ff0e0f3
coverity 472860: ops-h2: let coverity see all err enums covered
lws-team Jan 16, 2025
7333fcc
coverity 472861: http2: deal with zero length data without overflow
lws-team Jan 16, 2025
5d19474
lws_tls_openssl_asn1time_to_unix: fix 13 char asn1 epoch
lws-team Feb 24, 2025
df9f518
dos2unix: win32port/zlib/inftrees.c
lws-team Feb 24, 2025
bd57dbc
win32port: zlib: upstream bugfix patch on inftrees.c
madler Sep 22, 2016
e7fbdac
lws_mux_mark_immortal: remove noisy log
lws-team Feb 25, 2025
6414a1b
Subject: docs: fix typo
gmabey Feb 26, 2025
2ce0be3
async dns: allow up to 8 x 128-char CNAMEs from 4
lws-team Feb 27, 2025
ab9df9c
tag 4.3.5
lws-team Feb 28, 2025
81633be
PkgConfig: include libsystemd if needed by lib
mquinson Feb 7, 2025
2b0c5f1
mbedtls/ssl: free cert chain when mbedtls_client_preload_filepath ena…
ThePassionate Feb 12, 2025
45eca45
sll_protocol may be be16
lws-team Jan 22, 2025
9075f01
wolfssl: update membuf to use lws alloc
ribes96 Mar 13, 2025
d79fa76
freertos: fix pipe free
simon0356 Mar 23, 2025
0fb2e4f
clean: remove google fuzzer warning when no MQTT
lws-team Mar 24, 2025
a507693
Subject: [PATCH] Fix cgi QUERY_STRING key only field truncated
Apr 7, 2025
155726a
client-http: correct return for write error
dmpot Apr 8, 2025
ec1cd5c
client-http: improve exit paths
lws-team Apr 8, 2025
db62fbc
close: trim length of reason
lws-team May 6, 2025
92b4752
libev: run the loop in a way it can be cancelled
dmpot May 9, 2025
bb12612
adns: Report error code if callback destroyed wsi
May 14, 2025
e2cbcf7
cgi: allow some space for sundries in stdout buf
lws-team Jun 10, 2025
d444bc5
client: use return enum to clarify closure plan
lws-team Jul 1, 2025
f5c9df1
openssl: direct callback to best protocol
lws-team Jul 1, 2025
f98cde5
LICENSE: clarify licenses in summary
Jul 2, 2025
04dc49e
ssh: set correct lengths for sigma and tau
lws-team Jul 7, 2025
1d3e868
vhost: track vh-protocol protocol init
lws-team Apr 30, 2025
714bb9d
destroy: introduce pre_natal pt dll2
lws-team Jul 7, 2025
e83ed4e
mbedtls-server: verify_option and auth_mode options should be valid
ikicha Jul 18, 2025
b9c3ed4
eventfd: pipe: cleanup on ctx destruction
lws-team Sep 18, 2025
ccb67db
NN-2025-0102: UAF depending on upgrade allowed
Sep 24, 2025
33da595
NN-2025-0103: ADNS crafted response overflow
Sep 24, 2025
ea2da6c
fix(websocketdll): file and product version set as per tag version
VaibhavTekale1 Mar 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .sai.json
Original file line number Diff line number Diff line change
Expand Up @@ -243,11 +243,11 @@
"mbedtls": {
"cmake": "-DLWS_WITH_MBEDTLS=1 -DLWS_WITH_HTTP2=1 -DLWS_WITH_LWSWS=1 -DLWS_WITH_MINIMAL_EXAMPLES=1 -DLWS_WITH_JOSE=1 -DCMAKE_BUILD_TYPE=DEBUG",
# no distro -devel package for mbedtls
"platforms": "not linux-centos-7/x86_64-amd/gcc, not linux-centos-8/x86_64-amd/gcc"
"platforms": "not linux-centos-7/x86_64-amd/gcc, not linux-centos-8/x86_64-amd/gcc, not linux-ubuntu-xenial/x86_64-amd/gcc"
},
"mbedtls-metrics": {
"cmake": "-DLWS_WITH_MBEDTLS=1 -DLWS_WITH_HTTP2=1 -DLWS_WITH_LWSWS=1 -DLWS_WITH_MINIMAL_EXAMPLES=1 -DLWS_WITH_JOSE=1 -DCMAKE_BUILD_TYPE=DEBUG -DLWS_WITH_SYS_METRICS=1",
"platforms": "not linux-centos-7/x86_64-amd/gcc, not linux-centos-8/x86_64-amd/gcc"
"platforms": "not linux-centos-7/x86_64-amd/gcc, not linux-centos-8/x86_64-amd/gcc, not linux-ubuntu-xenial/x86_64-amd/gcc"
},
"noserver": {
"cmake": "-DLWS_WITHOUT_SERVER=ON -DLWS_WITH_MINIMAL_EXAMPLES=1 -DLWS_WITH_SECURE_STREAMS=1",
Expand Down
8 changes: 7 additions & 1 deletion CMakeLists-implied-options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ if (LWS_PLAT_OPTEE)
set(LWS_WITH_UDP 0)
endif()

if (LWS_PLAT_FREERTOS)
if (LWS_PLAT_FREERTOS OR (${CMAKE_SYSTEM_NAME} MATCHES "QNX"))
message(STATUS "No LWS_WITH_DIR or LWS_WITH_LEJP_CONF")
set(LWS_WITH_DIR OFF)
set(LWS_WITH_LEJP_CONF OFF)
Expand Down Expand Up @@ -368,6 +368,12 @@ if (LWS_WITHOUT_SERVER)
set(LWS_WITH_SERVER)
endif()

if (LWS_WITH_SERVER)
else()
set(LWS_WITH_CGI 0)
set(LWS_ROLE_CGI 0)
endif()

# using any abstract protocol enables LWS_WITH_ABSTRACT

#if (LWS_WITH_SMTP)
Expand Down
45 changes: 40 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,20 @@ if (ESP_PLATFORM)
endif()

# it's at this point any toolchain file is brought in
project(libwebsockets C CXX)
project(libwebsockets C)
if (LWS_WITH_SECURE_STREAMS_CPP)
enable_language(CXX)
endif()
include(CTest)

if (ESP_PLATFORM)
include_directories(
$ENV{IDF_PATH}/components/esp_hw_support/include/soc/
$ENV{IDF_PATH}/components/freertos/include/
$ENV{IDF_PATH}/components/freertos/esp_additions/include/
$ENV{IDF_PATH}/components/freertos/esp_additions/include/freertos/
$ENV{IDF_PATH}/components/freertos/FreeRTOS-Kernel/include/
$ENV{IDF_PATH}/components/freertos/FreeRTOS-Kernel/portable/linux/include/
$ENV{IDF_PATH}/components/xtensa/${CONFIG_IDF_TARGET}/include/
$ENV{IDF_PATH}/components/freertos/include/esp_additions
$ENV{IDF_PATH}/components/hal/include
Expand Down Expand Up @@ -175,7 +182,7 @@ option(LWS_WITH_SSL "Include SSL support (defaults to OpenSSL or similar, mbedTL
option(LWS_WITH_MBEDTLS "Use mbedTLS (>=2.0) replacement for OpenSSL. When setting this, you also may need to specify LWS_MBEDTLS_LIBRARIES and LWS_MBEDTLS_INCLUDE_DIRS" OFF)
option(LWS_WITH_BORINGSSL "Use BoringSSL replacement for OpenSSL" OFF)
option(LWS_WITH_CYASSL "Use CyaSSL replacement for OpenSSL. When setting this, you also need to specify LWS_CYASSL_LIBRARIES and LWS_CYASSL_INCLUDE_DIRS" OFF)
option(LWS_WITH_WOLFSSL "Use wolfSSL replacement for OpenSSL. When setting this, you also need to specify LWS_WOLFSSL_LIBRARIES and LWS_WOLFSSL_INCLUDE_DIRS" OFF)
option(LWS_WITH_WOLFSSL "Use wolfSSL replacement for OpenSSL. When setting this, you also may need to specify LWS_WOLFSSL_LIBRARIES and LWS_WOLFSSL_INCLUDE_DIRS" OFF)
option(LWS_SSL_CLIENT_USE_OS_CA_CERTS "SSL support should make use of the OS-installed CA root certs" ON)
option(LWS_TLS_LOG_PLAINTEXT_RX "For debugging log the received plaintext as soon as decrypted" OFF)
option(LWS_TLS_LOG_PLAINTEXT_TX "For debugging log the transmitted plaintext just before encryption" OFF)
Expand Down Expand Up @@ -403,7 +410,18 @@ set(CPACK_RPM_PACKAGE_LICENSE "MIT")
set(CPACK_PACKAGE_NAME "${PACKAGE}")
set(CPACK_PACKAGE_VERSION_MAJOR "4")
set(CPACK_PACKAGE_VERSION_MINOR "3")
set(CPACK_PACKAGE_VERSION_PATCH_NUMBER "0")
set(CPACK_PACKAGE_VERSION_PATCH_NUMBER "5")

# Override version components from git tag if available (e.g. v4.3.7 or v4.3.7-5-gabcdef)
if(GIT_HASH)
string(REGEX MATCH "^v?([0-9]+)\\.([0-9]+)\\.([0-9]+)" _GIT_VER_MATCH "${GIT_HASH}")
if(_GIT_VER_MATCH)
set(CPACK_PACKAGE_VERSION_MAJOR "${CMAKE_MATCH_1}")
set(CPACK_PACKAGE_VERSION_MINOR "${CMAKE_MATCH_2}")
set(CPACK_PACKAGE_VERSION_PATCH_NUMBER "${CMAKE_MATCH_3}")
message("Version overridden from git tag: ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH_NUMBER}")
endif()
endif()

set(CPACK_PACKAGE_VERSION_PATCH "${CPACK_PACKAGE_VERSION_PATCH_NUMBER}-${LWS_BUILD_HASH}")
set(CPACK_PACKAGE_RELEASE 1)
Expand Down Expand Up @@ -795,6 +813,14 @@ if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR COMPILER_IS_CLANG)
set(CMAKE_C_FLAGS "-Wall -Wsign-compare ${VISIBILITY_FLAG} ${GCOV_FLAGS} ${CMAKE_C_FLAGS}" )
endif()

if (PICO_SDK_PATH)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-unused-parameter -Wconversion -Wsign-compare -Wstrict-aliasing -Wundef -nolibc")
endif()

if (ESP_PLATFORM AND (CONFIG_IDF_TARGET_ESP32 OR CONFIG_IDF_TARGET_ESP32S2 OR CONFIG_IDF_TARGET_ESP32S3))
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mlongcalls")
endif()

if ("${DISABLE_WERROR}" STREQUAL "OFF")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
endif()
Expand Down Expand Up @@ -836,6 +862,12 @@ if (MSVC)
add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE)
# Fail the build if any warnings
add_compile_options(/W3 /WX)
# Unbreak MSVC broken preprocessor __VA_ARGS__ behaviour
if (MSVC_VERSION GREATER 1925)
add_compile_options(/Zc:preprocessor /wd5105)
else()
add_compile_options(/experimental:preprocessor /wd5105)
endif()
endif(MSVC)

if (MINGW)
Expand All @@ -861,11 +893,11 @@ endif()
#
# ZLIB (needed for deflate extension and if LWS_WITH_HTTP_STREAM_COMPRESSION)
#
if (LWS_WITH_ZLIB)
if (LWS_WITH_ZLIB AND NOT LWS_WITH_BUNDLED_ZLIB)
if (NOT ZLIB_FOUND)
if (LWS_WITH_MINIZ)
find_package(Miniz REQUIRED)
set(ZLIB_INCLUDE_DIRS ${MINIZ_INCLUDE_DIRS})
set(ZLIB_INCLUDE_DIRS ${MINIZ_INCLUDE_DIR})
set(ZLIB_LIBRARIES ${MINIZ_LIBRARIES})
else()
find_package(ZLIB REQUIRED)
Expand Down Expand Up @@ -1053,6 +1085,9 @@ file(RELATIVE_PATH
if (DEFINED REL_INCLUDE_DIR)
set(LWS__INCLUDE_DIRS "\${LWS_CMAKE_DIR}/${REL_INCLUDE_DIR}")
endif()
if (DEFINED OPENSSL_INCLUDE_DIRS)
set(LWS__INCLUDE_DIRS "${LWS__INCLUDE_DIRS};${OPENSSL_INCLUDE_DIRS}")
endif()

configure_file(${PROJECT_SOURCE_DIR}/cmake/libwebsockets-config.cmake.in
${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/libwebsockets-config.cmake
Expand Down
15 changes: 14 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
MIT License

Copyright (c) 2006-2025 Andy Green

Libwebsockets and included programs are provided under the terms of the
MIT license shown below, with the exception that some sources are under
a similar permissive license like BSD, or are explicitly CC0 / public
Expand Down Expand Up @@ -36,6 +40,12 @@ to us so you can easily use later releases and fixes.

## MIT License applied to libwebsockets

(lib/misc/base64-decode.c, lib/misc/daemonize.c, lib/plat/windows/windows-resolv.c)

lib/misc/base64-decode.c: Copyright (c) 2001 Bob Trower, Trantor Standard Systems Inc.
lib/misc/daemonize.c: Copyright (c)2006 - 2013 Andy Green <andy@warmcat.com>
lib/plat/windows/windows-resolv.c - Copyright (C) 2010 - 2019 Andy Green <andy@warmcat.com>

https://opensource.org/licenses/MIT

Permission is hereby granted, free of charge, to any person obtaining a copy
Expand All @@ -58,6 +68,10 @@ https://opensource.org/licenses/MIT

## BSD2

(lib/misc/ieeehalfprecision.c)

lib/misc/ieeehalfprecision.c - Copyright: (c) 2009 by James Tursa, All Rights Reserved

```
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
Expand Down Expand Up @@ -208,4 +222,3 @@ For these and/or other purposes and motivations, and without any expectation of
Affirmer disclaims responsibility for clearing rights of other persons that may apply to the Work or any use thereof, including without limitation any person's Copyright and Related Rights in the Work. Further, Affirmer disclaims responsibility for obtaining any necessary consents, permissions or other rights required for any use of the Work.
Affirmer understands and acknowledges that Creative Commons is not a party to this document and has no duty or obligation with respect to this CC0 or use of the Work.
```

2 changes: 1 addition & 1 deletion READMEs/README.build.md
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ https://www.wolfssl.com/wolfSSL/Products-wolfssl.html
It contains a OpenSSL compatibility layer which makes it possible to pretty
much link to it instead of OpenSSL, giving a much smaller footprint.

**NOTE**: wolfssl needs to be compiled using the `--enable-opensslextra` flag for
**NOTE**: wolfssl needs to be compiled using the `--enable-libwebsockets` flag for
this to work.

@section wolf1 Compiling libwebsockets with wolfSSL
Expand Down
33 changes: 11 additions & 22 deletions READMEs/README.coding.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,28 +183,17 @@ loop wait (sleeping in `poll()` or `epoll()` or whatever). The rules above
mean directly sending data on the connection from another thread is out of the
question.

Therefore the two apis mentioned above that may be used from another thread are

- For LWS using the default poll() event loop, `lws_callback_on_writable()`

- For LWS using libuv/libev/libevent event loop, `lws_cancel_service()`

If you are using the default poll() event loop, one "foreign thread" at a time may
call `lws_callback_on_writable()` directly for a wsi. You need to use your own
locking around that to serialize multiple thread access to it.

If you implement LWS_CALLBACK_GET_THREAD_ID in protocols[0], then LWS will detect
when it has been called from a foreign thread and automatically use
`lws_cancel_service()` to additionally wake the service loop from its wait.

For libuv/libev/libevent event loop, they cannot handle being called from other
threads. So there is a slightly different scheme, you may call `lws_cancel_service()`
to force the event loop to end immediately. This then broadcasts a callback (in the
service thread context) `LWS_CALLBACK_EVENT_WAIT_CANCELLED`, to all protocols on all
vhosts, where you can perform your own locking and walk a list of wsi that need
`lws_callback_on_writable()` calling on them.

`lws_cancel_service()` is very cheap to call.
The only lws api that's safe to call from other thread contexts is `lws_cancel_service()`.
This will take a platform-specific action to wake the lws event loop thread wait,
either put a byte into a pipe2() the event loop is waiting on, or send a packet on
a UDP socket pair that the event loop waits on. When the wake is handled by the
lws event loop thread, it will broadcast a `LWS_CALLBACK_EVENT_WAIT_CANCELLED`
message to every vhost-protocol instantiation, so you can handle this callback,
usually lock a shared data region, and if you see you need to write, call
`lws_callback_on_writable()` for the wsi(s) that need to write.

There's no restriction on multiple threads calling `lws_cancel_service()`, it's
unconditionally safe due to how it is implemented underneath.

5) The obverse of this truism about the receiver being the boss is the case where
we are receiving. If we get into a situation we actually can't usefully
Expand Down
25 changes: 18 additions & 7 deletions READMEs/README.lws_sul.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,33 +30,44 @@ scheduler from your own code; it uses it to spread out connection
attempts so they are staggered in time. You must create an
`lws_sorted_usec_list_t` object somewhere, eg, in you own existing object.

```
```c
static lws_sorted_usec_list_t sul_stagger;
```

Create your own callback for the event... the argument points to the sul object
used when the callback was scheduled. You can use pointer arithmetic to translate
that to your own struct when the `lws_sorted_usec_list_t` was a member of the
same struct.
that to your own struct (when the `lws_sorted_usec_list_t` was a member of the
some struct) by using `lws_container_of(sul, container_struct_type, field_name)`.

```c
typedef struct my_connection_data {
...
lws_sorted_usec_list_t sul_stagger;
...
} my_connection_data_t;

```
static void
stagger_cb(lws_sorted_usec_list_t *sul)
{
...
my_connection_data_t* my_data = lws_container_of(sul, my_connection_data_t, sul_stagger);
...
}
```

**Important note**: make sure, that `lws_sorted_usec_list_t` data initiallized by
zeros (`memset(&sul_stagger, 0, sizeof(lws_sorted_usec_list_t)`). This struct
contains pointers, so them must initially pointing to `NULL`!

When you want to schedule the callback, use `lws_sul_schedule()`... this will call
it 10ms in the future

```
```c
lws_sul_schedule(context, 0, &sul_stagger, stagger_cb, 10 * LWS_US_PER_MS);
```

In the case you destroy your object and need to cancel the scheduled callback, use

```
```c
lws_sul_schedule(context, 0, &sul_stagger, NULL, LWS_SET_TIMER_USEC_CANCEL);
```

Expand Down
6 changes: 4 additions & 2 deletions READMEs/README.tls-sessions.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@ valid session object.
### Difference from Session Tickets

TLS also supports sessions as bearer tokens, but these are generally considered
as degrading security. Lws doesn't support Session Tickets, just reuse by
Session IDs.
as degrading security. Lws doesn't do anything special for Session Tickets, but
it's possible your TLS library will support them by default, as is reportedly the
case with mbedtls 2.28.1. Either way, it's expected Session IDs should work with
lws if enabled and your tls library supports them.

## Support in lws

Expand Down
2 changes: 1 addition & 1 deletion cmake/FindOpenSSLbins.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ if(OPENSSL_FOUND)
get_filename_component(OPENSSL_EXECUTABLE_PATH ${OPENSSL_EXECUTABLE} DIRECTORY)
message(VERBOSE "OPENSSL_EXECUTABLE_PATH=${OPENSSL_EXECUTABLE_PATH}")
set(OPENSSL_EXECUTABLE_BIN_PATH "")
string(REGEX MATCH "^(.*)/tools/openssl$" REGEX_MATCH ${OPENSSL_EXECUTABLE_PATH})
string(REGEX MATCH "^(.*)/tools/openssl$" REGEX_MATCH "${OPENSSL_EXECUTABLE_PATH}")
message(DEBUG "REGEX_MATCH=\"${REGEX_MATCH}\"")
message(DEBUG "CMAKE_MATCH_1=\"${CMAKE_MATCH_1}\"")
if (NOT ${REGEX_MATCH} EQUAL "")
Expand Down
7 changes: 6 additions & 1 deletion cmake/LwsCheckRequirements.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
# If we are being built externally, confirm installed lws was configured to
# support reqconfig, else error out with a helpful message about the problem.
#

include(CheckIncludeFile)

MACRO(require_lws_config reqconfig _val result)

if (DEFINED ${reqconfig})
Expand Down Expand Up @@ -72,7 +75,9 @@ MACRO(require_pthreads result)
if (WIN32)
set(PTHREAD_LIB ${LWS_EXT_PTHREAD_LIBRARIES})
else()
set(PTHREAD_LIB pthread)
if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "QNX")
set(PTHREAD_LIB pthread)
endif()
endif()
endif()
ENDMACRO()
Expand Down
18 changes: 15 additions & 3 deletions cmake/libwebsockets-config.cmake.in
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# - Config file for lws

# It defines the following variables
# LIBWEBSOCKETS_INCLUDE_DIRS - include directories for FooBar
# LIBWEBSOCKETS_INCLUDE_DIRS - include directories for lws
# LIBWEBSOCKETS_LIBRARIES - libraries to link against

# Get the path of the current file.
get_filename_component(LWS_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
list(APPEND CMAKE_MODULE_PATH ${libwebsockets_DIR})

# Set the include directories.
set(LIBWEBSOCKETS_INCLUDE_DIRS "@LWS__INCLUDE_DIRS@")
set(LIBWEBSOCKETS_INCLUDE_DIRS "@LWS__INCLUDE_DIRS@" "@LWS_PUBLIC_INCLUDES@")

# Include the project Targets file, this contains definitions for IMPORTED targets.
include(${LWS_CMAKE_DIR}/LibwebsocketsTargets.cmake)
Expand All @@ -17,8 +17,20 @@ include(${LWS_CMAKE_DIR}/LwsCheckRequirements.cmake)
# IMPORTED targets from LibwebsocketsTargets.cmake
set(LIBWEBSOCKETS_LIBRARIES websockets websockets_shared)

# These are additional include paths you will need
foreach(item "${LIBWEBSOCKETS_INCLUDE_DIRS}")
include_directories(${item})
set(CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES}" ${item})
endforeach()

# These are additional libs that lws wants your app to also link to
foreach(item "@LIB_LIST_AT_END@")
list(APPEND LIBWEBSOCKETS_DEP_LIBS ${item})
endforeach()

# Move boilerplate for consuming cmake files into here

include(CheckIncludeFile)
include(CheckCSourceCompiles)
set(requirements 1)

1 change: 1 addition & 0 deletions cmake/lws_config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
#cmakedefine LWS_HAVE_mbedtls_ssl_set_verify
#cmakedefine LWS_HAVE_mbedtls_x509_crt_parse_file
#cmakedefine LWS_HAVE_MBEDTLS_NET_SOCKETS
#cmakedefine LWS_HAVE_MBEDTLS_SSL_NEW_SESSION_TICKET
#cmakedefine LWS_HAVE_MBEDTLS_AUTH_KEY_ID
#cmakedefine LWS_HAVE_NEW_UV_VERSION_H
#cmakedefine LWS_HAVE_OPENSSL_ECDH_H
Expand Down
Loading