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

4461 commits

Author SHA1 Message Date
orefkov
cad13a8864 acme: update for v2
https://github.com/warmcat/libwebsockets/issues/2609

AG: api logging updates
2022-05-17 15:37:16 +01:00
Per Bothner
88a400515f docs: fix typo 2022-05-17 15:37:16 +01:00
wayneonway
ec81f538be netlink: route handling checks for SRC when it means DST
https://github.com/warmcat/libwebsockets/issues/2603
2022-05-17 15:37:16 +01:00
Scott Rankin
3268db0ae8 cmake: msvc: avoid having to use both preprocessor flags
https://github.com/warmcat/libwebsockets/issues/2600
2022-05-17 15:37:16 +01:00
Felipe Gasper
a7f2e29881 client: connect report actual socket error to user callback rather than EINPROGRESS
https://github.com/warmcat/libwebsockets/pull/2452
2022-05-17 15:37:15 +01:00
Andy Green
10044198c5 logs: use finegrained level test on unix-sockets.c 2022-05-17 15:34:30 +01:00
apcui
e5d73be53d windows: avoid NULL addr on connect check
https://github.com/warmcat/libwebsockets/issues/2596
2022-05-17 15:34:30 +01:00
Andy Green
3d98e29518 raw: tls conns
Raw + tls needs a little extra handling during connect.
2022-05-17 15:34:30 +01:00
Andy Green
02f7e06776 sul: add clear advice for zombie suls 2022-05-17 15:34:30 +01:00
Andy Green
995a759184 h1: remove assert on unexpected POLLIN state just hangup 2022-05-17 15:34:30 +01:00
Max Lehn
f8e3d09113 cmake: fix FindOpenSSLbins error when no OpenSSL executable found
This fixes CMake error "mode MATCH needs at least 5 arguments total to
command" while configuring when no OpenSSL executable was found.
Tested under Windows using VS2019.
2022-05-17 15:34:30 +01:00
Andy Green
69e1507c8c logs: freertos adds free heap to all logs 2022-05-17 15:34:30 +01:00
Andy Green
db5f574b03 nsc: fall back to internal headers when no stash 2022-05-17 15:34:30 +01:00
Andy Green
b92391050d esp32: heltec: change delay
Newer esp-idf has lost ets-delay-us
2022-05-17 15:34:30 +01:00
Andy Green
8782a47a05 gcc12: fix potential test app string overflow 2022-05-17 15:34:30 +01:00
Andy Green
2cf7e0f4ec coverity: 2021-12-1 uplevel fixes 2022-05-17 15:34:22 +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
Andy Green
15db074b70 context_destroy: clean up early fail path 2022-05-17 15:09:09 +01:00
Andy Green
89f489f15c plugins: openmetrics_export: graceful fail if unconfigured 2022-05-17 15:08:23 +01:00
Andy Green
8b6f2d5dba gcc4: conceal typedef in public header
Modern toolchains are fine with giving a typedef as a forward reference,
but gcc 4.3 can't cope with that and then seeing the real definition in the
.c later.

Just conceal the typedef and use the struct form for the forward reference
resolution type in the public header so even senior toolchains are happy.
2022-05-17 15:07:29 +01:00
Andy Green
058f97e687 netlink: always delete route if it exists
https://github.com/warmcat/libwebsockets/issues/2567
2022-05-17 15:07:19 +01:00
Andy Green
1f2912d383 pkgconfig: use appropriate static lib name 2022-02-21 11:10:05 +00:00
wayneonway
4fb9a535db route: extend lws_route_uidx_t from 1 byte to 2 bytes 2022-02-21 11:08:21 +00:00
Andy Green
fcde566fc6 cgi: gracefully handle missing wsi->http.cgi 2022-02-21 11:08:19 +00:00
Andy Green
027fe42cec h1: deal with WAITING_CONNECT in ops-h1
We don't normally see events on the wsi in this state, but it is possible
since warmcat.com lwsws asserted on it in WAITING_CONNECT.

Explicitly handle it so we don't blow up.
2022-02-21 11:08:12 +00:00
Luciano Iam
28b1e1f463 mingw: correct winsock recv() and send() buffer ptr type
This allows to build libwebsockets on MinGW. Winsock recv() and send()
expect non unsigned char* while lws uses uint_8*.

https://docs.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-send
https://docs.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-recv
2022-02-21 11:08:01 +00:00
Andy Green
0033accb83 lejp-conf: provide matches for block start paths
Also valgrind shows we should zero down the lejp context to avoid problems
with the wildcard stack
2022-02-11 08:43:16 +00:00
Andy Green
8d560a562f ss: POLL to all retries failed is possible
It's possible we started POLL, but no connection could happen for some
reason, and we end in the window between POLL and trying the connection.
2022-02-10 08:10:25 +00:00
Andy Green
890766083d ss: avoid POLL-POLL transition 2022-02-10 06:11:50 +00:00
Poppy
ca3f639edd tls: libressl: refactor set_options to work with macro implementations
Libressl uses macros for set_options(), causing compilation failure.
Refactor the related code to work well with macro definitions for
these apis.

https://github.com/warmcat/libwebsockets/issues/2554
2022-02-09 20:12:31 +00:00
Andy Green
ab7ce50174 http: proxy server: move C99 VLA to heap 2022-02-09 20:12:31 +00:00
Andy Green
8111d47f40 cmake: remove duplicate LwsCheckRequirements 2022-02-09 20:12:31 +00:00
Andy Green
c7e82fb29c ss: http: unreachable superfluous if we did DISCONNECTED 2022-02-09 20:12:31 +00:00
Andy Green
3f19d94040 jit-trust: adapt for esp-idf pre v3 mbedtls
Ensure we still work with mbedtls_ssl_conf_verify() as well as
mbedtls_ssl_set_verify() if that's what we have got.

Make sure mbedtls tls validation is noisy and fast.

Disable Xenial + mbedtls in sai, it fails but not when the same
tests are run from the commandline.  Very few people will be
using Xenial (2016 Ubuntu release) with mbedtls.
2022-02-09 20:12:31 +00:00
Andy Green
3eae5f8bca ss: reject direct protocol metadata if NULL ss wsi
The ss wsi may be NULL after any time around the event loop.  Make sure we
check that before we start trying to use it.
2022-02-09 20:12:31 +00:00
Andy Green
1027d3a740 ss: http: ensure SS points to wsi when using wsi pointing to SS
If we're going to take a wsi's word for it that it is bound to a particular
SS, make sure the SS is also bound to the same wsi.
2022-02-09 19:41:17 +00:00
Chunho Lee
a80fbeb820 ss: mqtt: add support for retained message 2022-02-07 09:37:34 +00:00
Chunho Lee
7e3125b818 minimal: ss: policy2c: add more MQTT related fields
This adds 'aws_iot', 'birth_topic', and 'birth_message'
on policy2c.
2022-02-03 11:28:33 +00:00
Chunho Lee
eda299bd71 ss: mqtt: fix wrong QoS value on Birth message 2022-02-03 10:20:34 +00:00
Sylvain Saunier
bb759fd983 route: fix nl groups and local ipv6 ads 2022-02-03 10:20:16 +00:00
Andy Green
939a512413 mbedtls: improve api detection
mbedtls cmake api detection was not able to work on esp-idf well.

Improve diagnostics and reaction if we ever see that again.
2022-02-01 14:09:19 +00:00
Rosen Penev
1f9925b443 genec: show correct nid when not allowed
As noticed by gcc11 warning

https://github.com/warmcat/libwebsockets/pull/2551
2022-02-01 14:04:33 +00:00
Andy Green
b709d50f8f coverity: mark false positive
Coverity doesn't understand the state relationship means that ssi will only
be used to create the proxy-side SS representing the remote client SS,
which happens as the first command in the state flow.

Mark the call up to disable the false error report.
2022-01-28 10:20:29 +00:00
Andy Green
1b77c2ff4c coverity: change ss handle priv style
Coverity is able to misunderstand &h[1] to be a dereference of h, when it
is just (h + 1).

Adapt places where we use this style to get a pointer to the SS priv data
to use (h + 1) so we don't have to see any more of coverity's confusion.
2022-01-28 08:59:52 +00:00
Andy Green
310c8baa81 logs: lock log context refcount changes
Enabling the locking requires -DLWS_MAX_SMP=2 or more.
2022-01-27 14:31:29 +00:00
Andy Green
f99bf7748c logs: openssl session: improve detection of INFO enabled
https://github.com/warmcat/libwebsockets/issues/2540
2022-01-27 14:31:10 +00:00
yogpstop
637ed905af http: lws_add_http_header_by_name: add colon if needed 2022-01-27 14:30:12 +00:00
Andy Green
91f0b3bc0f sort-dns: fix scope comparison
https://github.com/warmcat/libwebsockets/issues/2537
2022-01-16 13:32:51 +00:00
Andy Green
a352b9bf20 http: access_log: fix nwsi check
h2 logging often lacked the IP as it checked the af on the sa46_peer of the
child stream when it meant to check the nwsi one.
2022-01-16 13:32:30 +00:00
Andy Green
10a34fc43b coverity fixes 2022-01-16 13:32:09 +00:00