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

153 commits

Author SHA1 Message Date
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
dcf9dcaf2a unix-file: Fix signed/unsigned implicit conversion 2024-10-03 05:21:50 +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
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
ribes96
7467274d4d cgi: setenv: remove equals from arg
https://github.com/warmcat/libwebsockets/issues/3222
2024-09-23 10:39:23 +01:00
Arenoros
9bfca5b7c3 From a966322704 Mon Sep 17 00:00:00 2001
Subject: [PATCH] fix build on QNX 6.5.0
2022-07-13 06:23:40 +01:00
Andy Green
10044198c5 logs: use finegrained level test on unix-sockets.c 2022-05-17 15:34:30 +01:00
Andy Green
49af3742c6 mbedtls: v3.1 reverts privacy of mbedtls_net_context fd
mbedtls seemed to realize that they went overboard with the privacy stuff
on v3.0 and removed some of it.  Introduce support for those members that
are only private on exactly v3.0 and unprotected before and after.
2022-05-17 15:09:20 +01:00
chenzhongaaron
9cd7438259 qnx: toolchain file and adaptations
https://github.com/warmcat/libwebsockets/issues/2527
2022-01-04 15:58:41 +00:00
calvin2021y
b0b7fff957 android: fix extra warnings on android-resolv 2021-11-22 15:40:07 +00:00
Andy Green
a00703f500 unix-sockets: NOP for coverity
continue here makes no difference than using break, but continue gets us a
pointless complaint "statement continue does not have any effect" and break
does not.
2021-11-08 11:05:28 +00:00
Andy Green
d1f3762a05 types: handle ssize_t is int 2021-08-09 17:31:16 +01:00
Andy Green
5ddb03d146 iface: score binds
Choose the best fit for iface ip addresses by scoring the
unsorted results from getifaddrs()
2021-07-20 10:33:56 +01:00
Andy Green
4b089788bc tls: mbedtls-3
Adapt mbedtls support for compatibility with v3, while maintaining
compatibility with v2.

Notice v3 has removed the ability to encrypt with pubkey and
decrypt with privkey.  Openssl still has it, atm with v3 these
fall back to encrypt with privkey and decrypt with pubkey.

> The RSA module no longer supports private-key operations with the
> public key or vice versa. As a consequence, RSA operation functions
> no longer have a mode parameter. If you were calling RSA operations
> with the normal mode (public key for verification or encryption,
> private key for signature or decryption), remove the
> MBEDTLS_MODE_PUBLIC or MBEDTLS_MODE_PRIVATE argument. If you were
> calling RSA operations with the wrong mode, which rarely makes sense
>from a security perspective, this is no longer supported.
2021-07-13 13:22:50 +01:00
Andy Green
4c4b2c5dcf libevent: use event_enable_debug_mode 2021-07-13 08:27:18 +01:00
Andy Green
5d8cf03221 logs: log contexts 2021-07-01 05:20:53 +01:00
Andy Green
8e76634ed3 logs: introduce log_cx 2021-07-01 05:20:53 +01:00
DUOLabs333
d815c39c0c cygwin: include in unix type socket init 2021-06-07 08:17:52 +01:00
Andy Green
faad862fb2 coverity: ntp from blob: handle blob missing 2021-06-04 14:58:15 +01:00
Andy Green
ad3aa5339e TCP_FASTOPEN 2021-05-25 08:13:13 +01:00
Andy Green
19d59f9977 listen: ip bind: force ipv4 if given ipv4 numeric iface 2021-05-06 20:51:43 +01:00
Andy Green
350284590c cmake: LWS_WITHOUT_EVENTFD 2021-04-20 14:58:23 +01:00
Andy Green
51490ae6e6 Fault injection
add lws_xos: xoshiro256 PRNG
2021-04-05 10:55:04 +01:00
Pavel Otchertsov
9453d246d9 unix: fix usage of getpwnam_r and friends
These functions can return 0 code but still store NULL in result, if no matching group or username found.
Also the buffer of 64 size could be too small to store all string fields in result.
2021-03-25 08:40:52 +00:00
Andy Green
b9ee27f3c5 unix: use getpwnam_r and friends
Figure out if the threadsafe versions are available on the platform and
use them if so
2021-03-25 08:40:52 +00:00
Andy Green
e97a61f22b logs: reduce verbosity on plugins probing 2021-03-17 12:23:28 +00:00
Andy Green
b34862bf8a netbsd: follow openbsd use of wait4
Otherwise sai is sometimes failing to get the correct process exit code

spawn: use WEXITSTATUS macro

On openbsd at least, the process retcode isn't in the low 8 bits, but must
be recovered using the official macro.
2021-03-16 08:15:28 +00:00
Andy Green
3ca8625129 adopt: rejection should not loop with listen adoption 2021-03-14 15:05:19 +00:00
Curi0
dbc89c88ec windows: openssl: load certificates from certificate store 2021-03-12 09:25:51 +00:00
Andy Green
3f4623bb36 lws_metrics
There are a few build options that are trying to keep and report
various statistics

 - DETAILED_LATENCY
 - SERVER_STATUS
 - WITH_STATS

remove all those and establish a generic rplacement, lws_metrics.

lws_metrics makes its stats available via an lws_system ops function
pointer that the user code can set.

Openmetrics export is supported, for, eg, prometheus scraping.
2021-03-08 21:47:28 +00:00
Andy Green
d72955cc7f solaris: spawn: vfork is deprecated on solaris 11 2021-03-08 20:43:50 +00:00
Andy Green
e7a96a7175 solaris: socket priority 2021-03-08 20:43:29 +00:00
Andy Green
dc051fb2ae OpenBSD: various api ports 2021-02-17 11:39:15 +00:00
Andy Green
599691d233 dhcp: clean 2021-02-17 11:39:15 +00:00
Andy Green
eb782bd41e ip tos support 2021-02-04 10:28:02 +00:00
Andy Green
6497220e87 plugins: add LWS_BUILD_HASH to header and require match
Also prioritize LD_LIBRARY_PATH check for plugins first

Iterate through paths in LD_LIBRARY_PATH in order

Warn on failed plugins init but continue protocol init
2021-01-28 05:52:41 +00:00
Andy Green
beacabbdb1 vhost_destroy: refactor 2021-01-22 12:31:15 +00:00
Andy Green
f1e5e573e6 destroy: shuffle for internal 2021-01-22 12:24:58 +00:00
Andy Green
95a545b741 evlib: count extant evlib handles instead of wsi 2021-01-19 17:07:33 +00:00
Andy Green
9ed9a04870 unix-caps: switch to unsigned mode for Wconversion 2021-01-19 06:43:27 +00:00
Andy Green
1062149e9f service: restrict effective wait to platform resolution 2021-01-17 11:32:48 +00:00
Andy Green
c9731c5f17 type comparisons: fixes
This is a huge patch that should be a global NOP.

For unix type platforms it enables -Wconversion to issue warnings (-> error)
for all automatic casts that seem less than ideal but are normally concealed
by the toolchain.

This is things like passing an int to a size_t argument.  Once enabled, I
went through all args on my default build (which build most things) and
tried to make the removed default cast explicit.

With that approach it neither change nor bloat the code, since it compiles
to whatever it was doing before, just with the casts made explicit... in a
few cases I changed some length args from int to size_t but largely left
the causes alone.

From now on, new code that is relying on less than ideal casting
will complain and nudge me to improve it by warnings.
2021-01-05 10:56:38 +00:00
Andy Green
0ceba15d9c lws_lifecycle
This adds some new objects and helpers for keeping and logging
info on grouped allocations, a group is, eg, SS handles or client
wsis.

Allocated objects get a context-unique "tag" string intended to replace
%p / wsi pointers etc.  Pointers quickly become confusing when
allocations are freed and reused, the tag string won't repeat
until you produce 2^64 objects in a context.

In addition the tag string documents the object group, with prefixes
like "wsi-" or "vh-" and contain object-specific additional
information like the vhost name, address / port  or the role of the wsi.
At creation time the lws code can use a format string and args
to add whatever group-specific info makes sense, eg, a wsi bound
to a secure stream can also append the guid of the secure stream,
it's copied into the new object tag and so is still available
cleanly after the stream is destroyed if the wsi outlives it.
2021-01-04 05:26:50 +00:00
Andy Green
d330dbd76a wsi: unify base wsi creation function
A few different places want to create wsis and basically repeat their
own versions of the flow.  Let's unify it into one helper in wsi.c

Also require the context lock held (this only impacts LWS_MAX_SMP > 1)
2021-01-04 05:26:50 +00:00
Andy Green
9b42fc6aae NetBSD: also need two-arg setpgid
Enable sai
2020-12-07 11:31:53 +00:00
Andy Green
8b82560014 cmake: netbsd: no libdl 2020-12-06 19:39:35 +00:00
Andy Green
962e9ee345 wip: ss c++ classes
C++ APIs wrapping SS client


These are intended to provide an experimental protocol-independent c++
api even more abstracted than secure streams, along the lines of
"wget -Omyfile https://example.com/thing"

WIP
2020-12-02 10:15:50 +00:00
Andy Green
0ff5a1df75 ctest: sspc proxy minimal
CTest does not directly support daemon spawn as part of the test flow,
we have to specify it as a "fixture" dependency and then hack up daemonization
in a shellscript... this last part unfortunately limits its ability to run to
unix type platforms.

On those though, if the PROXY_API cmake option is enabled, the ctest flow will
spawn the proxy and run lws-minimal-secure-strems-client against it
2020-12-01 15:38:20 +00:00
Andy Green
2bcae2b3b6 context: refactor destroy flow 2020-11-28 10:58:38 +00:00