1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00
Commit graph

3618 commits

Author SHA1 Message Date
makejian
2b0c5f1653 mbedtls/ssl: free cert chain when mbedtls_client_preload_filepath enabled
Signed-off-by: makejian <makejian@xiaomi.com>
2025-03-03 07:43:17 +00:00
Martin Quinson
81633bef2a PkgConfig: include libsystemd if needed by lib 2025-02-28 17:23:39 +00:00
Andy Green
2ce0be3284 async dns: allow up to 8 x 128-char CNAMEs from 4
https://github.com/warmcat/libwebsockets/issues/3329

Extra ~600 bytes stack needed might be a struggle for RTOS, trimmed from 10
recommended in issue.
2025-02-27 07:41:53 +00:00
Andy Green
e7fbdac391 lws_mux_mark_immortal: remove noisy log 2025-02-25 19:38:02 +00:00
Andy Green
5d1947474e lws_tls_openssl_asn1time_to_unix: fix 13 char asn1 epoch
Also align to struct tm's year epoch of 1900

https://github.com/warmcat/libwebsockets/issues/3341
2025-02-24 12:52:33 +00:00
Andy Green
7333fcc9cd coverity 472861: http2: deal with zero length data without overflow 2025-01-19 16:59:34 +00:00
Andy Green
ff0e0f3c35 coverity 472860: ops-h2: let coverity see all err enums covered
x
2025-01-19 16:59:25 +00:00
Andy Green
b81b24d10e coverity 472863: cookies: length check order wrong 2025-01-19 16:59:17 +00:00
Andy Green
5a34404b1a coverity 872858: hash gen overflow false positive
Help it ignore that we use the MS 7 bits in the next part of the operation
and discard it in the first part.
2025-01-19 16:58:57 +00:00
Andy Green
fce734f279 coverity 472862: cookiejar overflow 2025-01-19 16:58:46 +00:00
Davidovory03
e5506ade69 mbedtls: translate error codes for caller
https://github.com/warmcat/libwebsockets/issues/3315
2025-01-19 16:57:24 +00:00
Albert Ribes
c6e9792188 lejp: E implies float
Since eg, 1e-3 is a float without needing a decimal point, let's just
    generally take it that anything with the exponent token is a float, ie, 1e3
    is also a float despite it can be expressed as an integer.

    This seems right also because E is itself not valid in an integer.

    https://github.com/warmcat/libwebsockets/issues/3308
2025-01-10 14:14:49 +00:00
Andy Green
dc65edd519 spa: use sized local info rather than incoming
We allow a default 0 length in the incoming const info to mean a default
size (of 512).  We implement it by copying the incoming const info to a
copy in the spa that we can adapt, which is all good.

But in two cases after we dumbly use the incoming const info directly
instead of the adapted copy.

https://github.com/warmcat/libwebsockets/issues/3294
2024-12-13 09:23:07 +00:00
Orgad Shaneh
c4b1e34a50 clean: var unused when no logs 2024-11-16 09:08:31 +00:00
Lucas
a71a62f51b mbedtls: fix issue about memory leak
https://github.com/warmcat/libwebsockets/issues/3177
2024-11-08 07:58:59 +00:00
Orgad Shaneh
5102a5c8d6 tls-sessions: Pass correct type for printf %u 2024-10-06 08:11:58 +01:00
Orgad Shaneh
8ad16af9a3 win: simplify error logging in windows-sockets.c 2024-10-03 05:27:54 +01:00
Orgad Shaneh
dcf9dcaf2a unix-file: Fix signed/unsigned implicit conversion 2024-10-03 05:21:50 +01:00
Andy Green
a1ee5a2c50 mbedtls: provide declaration if ge 3.5
https://github.com/warmcat/libwebsockets/issues/3169
2024-09-29 11:50:41 +01:00
Andy Green
e24114fed9 win: file: use INVALID_HANDLE_VALUE directly
c571d22dba (commitcomment-142753910)
2024-09-25 12:24:35 +01:00
Andy Green
f7aeadeb0e win: trigger context destroy if pt destroying itself
https://github.com/warmcat/libwebsockets/issues/3182

This follows the flow for *nix
2024-09-25 09:37:03 +01:00
Andy Green
8fc7596fec event: blow error if runtime context options want eventlib we dont have
https://github.com/warmcat/libwebsockets/issues/3186
2024-09-25 09:03:36 +01:00
Andy Green
2ca5d8605b ws: increase sanity check for spins needed to consume buffer to 100
https://github.com/warmcat/libwebsockets/issues/3184
2024-09-25 08:53:41 +01:00
Andy Green
b05e95ec87 pipe: only pt destroy pipe close should close pipe fds
https://github.com/warmcat/libwebsockets/issues/2873
2024-09-25 08:38:44 +01:00
Andy Green
86819f05af win32: upscale timeout_ms to 64-bit int
This may help with this:

https://github.com/warmcat/libwebsockets/issues/3201
2024-09-25 07:11:29 +01:00
Andy Green
51c47daea3 without-server: adapt loops to not touch listen_list
https://github.com/warmcat/libwebsockets/issues/3203
2024-09-25 07:03:54 +01:00
Andy Green
3976131e35 unix-sockets: extra care around short for some toolchains
https://github.com/warmcat/libwebsockets/issues/3163
2024-09-25 06:38:09 +01:00
Andy Green
57a0c16aeb openbsd: disable HIGH_RELIABLITY socket option
https://github.com/warmcat/libwebsockets/issues/3204
2024-09-25 06:32:13 +01:00
Andy Green
154bf55441 openssl: allow custom SSL_CTX with GLOBAL_INIT unset 2024-09-23 13:10:30 +01:00
Andy Green
8c8a2a5be3 lws_map: remove typedef for some toolchains
This backports a change that has been in main for a while
2024-09-23 11:06:36 +01:00
ribes96
7467274d4d cgi: setenv: remove equals from arg
https://github.com/warmcat/libwebsockets/issues/3222
2024-09-23 10:39:23 +01:00
zzblydia
ca375a4cab client hs: fix segmentation fault
https://github.com/warmcat/libwebsockets/pull/3171
2024-06-24 09:09:00 +01:00
streltsovdd
c571d22dba windows: fix check of result of CreateFileW 2024-06-04 06:06:51 +01:00
Seo Suchan
c90a77f124 mbedtls: fix compile on mbedtls ge 3.6 2024-05-07 13:48:09 +01:00
payne.ye
bd8f69e438 smp: extend client to work with tsi
and take care of zombie sul previously left on connect failure path
2024-04-12 06:25:21 +01:00
p-luke
eac4489237 netlink: when binding the per-context socket, let the kernel choose the unicast address.
When using multiple client contextes in a single application, rops_pt_init_destroy_netlink() fails binding the second socket and on - only the first one succeeds. The failure is made obvious by this log:
  W: rops_pt_init_destroy_netlink: netlink bind failed

So, let's fix this by doing what netlink(7) man page suggests:
  If the application sets nl_pid before calling bind(2), then it is up to the
  application to make sure that nl_pid is unique. If the application sets it
  to 0, the kernel takes care of assigning it. The kernel assigns the process
  ID to the first netlink socket the process opens and assigns a unique nl_pid
  to every netlink socket that the process subsequently creates.
2024-03-20 07:29:48 +00:00
Liu DongMiao
6901c32a9d raw-skt: don't read more than rx_buffer_size
When other roles like ws reading data, they follow `rx_buffer_size`, then fallback to context's `pt_serv_buf_size`.
However, `raw-skt` don't follow `rx_buffer_size`, always use 0, then fallback to `pt_serv_buf_size`.

This PR make `raw-skt` don't read more than `rx_buffer_size` data.
2024-03-07 09:50:47 +00:00
Liu Dongmiao
130a446b90 wolfssl: fix build 2024-03-07 09:50:41 +00:00
Liu DongMiao
893ff81a8d raw: connect callback can be triggered twice 2024-03-07 09:50:33 +00:00
Lio DongMiao
0fd97f652a context: fall back if no build-time mbedtls version 2024-03-07 09:50:26 +00:00
Dustin Lundquist
ab683ca6a6 ev: remove any watchers on close 2024-01-15 09:30:25 +00:00
DomB
881a0ac34a lecp: fix format_scan function for numeric longer than 2 digits and negative numbers 2024-01-08 09:18:32 +00:00
Philippe Ombredanne
be473054bd License: Fix typo in MIT text in fsmount.c
Somehow, a string replacement of ns by fsm had damaged
the license text and introduced garbage.

Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
2023-11-27 09:45:01 +00:00
Lonny Wong
bfa67ecf0c pmd: revert #3014 and drain extensions before next ssl read 2023-11-24 05:52:12 +00:00
Luka Kudra
f8eac4e83b mbedtls: dont rely on potentially missing version api
https://github.com/warmcat/libwebsockets/issues/3013
2023-11-21 17:10:54 +00:00
Lonny Wong
eba1e4aa7f pmd: fix buffer being reused while draining extensions 2023-11-21 17:10:48 +00:00
zzblydia
96dffe862d cmake: ssl lib paths
replace PC_OPENSSL_LIBRARIES with PC_OPENSSL_LINK_LIBRARIES to link library with absolute path.
2023-11-19 09:06:22 +00:00
Orgad Shaneh
cd8fb61f3b windows: evade unused var warnings when logs disabled
https://github.com/warmcat/libwebsockets/pull/2792
2023-11-18 05:36:58 +00:00
Khem Raj
59d42bcc74 gcc: fix mbedtls missing enum
bcd970fb4f
2023-11-17 07:07:35 +00:00
Lonny Wong
8a190f2758 libuv: fix idle being stopped when there is still pending stuff
https://github.com/warmcat/libwebsockets/pull/3008
2023-11-16 18:22:31 +00:00