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

4363 commits

Author SHA1 Message Date
Andy Green
cb7dd8c765 bind: use vhost log ctx since wsi optional 2021-10-16 08:23:18 +01:00
Andy Green
52e192ba4a cmake: add inclusion of CheckIncludeFile in req 2021-10-16 08:23:14 +01:00
Felipe Gasper
9c718e47e2 logs: log context: async_dns
Of note: A single use of lwsl_debug() remains because the function in
question is documented as a public API, but the passed-in parameter
doesn’t offer a path to a logging context.
2021-10-16 08:23:09 +01:00
Andy Green
7e09e42472 freertos: no need to freak out if service_adjust_to is 0
If lws_s_a_t() is zero, there's a path where n stays -1 from its
declaration and we return -1.
2021-10-15 19:07:33 +01:00
Felipe Gasper
81830a3979 logs: migrate more to log context 2021-10-15 14:11:41 +01:00
Felipe Gasper
80b0c59ad6 client: fix nxdomain CCE 2021-10-15 14:11:41 +01:00
Orefkov Aleksander
abef9ba252 http: spa: fetch any params
Added the ability to get additional form parameters with unknown names in the form parameters parser lws_spa. The example of using the form parameters parser has been updated. Fixed bug of double freeing memory in the example.
2021-10-15 08:47:52 +01:00
Yichen Gu
43c4b79960 ss: static policy generator: fix filepath detection 2021-10-13 15:56:29 +01:00
Yichen Gu
c3515cd6d9 mqtt: protect printing debug only vars 2021-10-13 15:56:22 +01:00
Felipe Gasper
a2ff2ba4eb logs: migrate ws extension code to contextual logging 2021-10-13 11:10:52 +01:00
Felipe Gasper
5a9ede36db logs: migrate client-parser-ws.c to contextual logging 2021-10-13 09:53:14 +01:00
Orefkov Aleksander
1274ea03c0 mbedtls: windows: add define to be compatible with the latest versions of mbedtls 2021-10-12 15:37:23 +01:00
Orefkov Aleksander
15513d1ee4 mbedtls: set length even when LWS_HAVE_mbedtls_ssl_get_alpn_protocol 2021-10-12 10:17:39 +01:00
Orefkov Aleksander
f0e4eac10b cmake: wrong miniz include dir + mbed link on windows 2021-10-12 09:16:26 +01:00
Andy Green
028deaeaa5 smd: take message lock earlier 2021-10-12 09:14:47 +01:00
Felipe Gasper
f9d9cb3bb7 Teach client-ws.c about log contexts. 2021-10-12 07:33:19 +01:00
Andy Green
3ae573cf9b remove: ss plugins
These have been disabled via a preprocessor symbol with no UI to enable it
for a year or so, it looks like they are not going to be needed.

The model of in-tree auth selectable from cmake looks like it will do for
everything, or if not, the solution will probably look different to this.
2021-10-12 07:33:18 +01:00
Andy Green
f5edf9d75a remove: lws_sequencer
lws_sequencer and lws_abstract were both false starts trying to do the
functionality of secure streams.

Since Secure Streams does a better job for both and there are no known
out-of-tree users of them, let's remove them and focus on Secure Streams.
2021-10-12 07:33:15 +01:00
Andy Green
057d03997f jrpc: add support 2021-10-11 09:10:15 +01:00
Yichen Gu
e3544456d8 lecp: remove extra struct lws_lec_pctx fwd definitions
C++ compilers set to less than C11 may choke on it, it's anyway not needed
any more since no references between that and the actual definition.
2021-10-11 09:09:37 +01:00
Andy Green
83b0221ba8 minimal: esp32: wrover display: increase smd timeout to cover delays in display 2021-10-09 07:36:39 +01:00
Andy Green
51e4cc8258 ss: mass update LE root to ISRG X1 2021-10-08 09:49:06 +01:00
Andy Green
8fd1ea6180 examples: move existing to m-e-lowlevel and start repoulating m-e with SS 2021-10-08 09:49:05 +01:00
Andy Green
2cfa260e62 sspc: refactor to allow different transports
This is a NOP for existing usecases.

At the moment the only implemented transport for serialized SS is wsi, it's
typically used with Unix Domain Sockets, but it also works over tcp the
same.

It generalizes the interface between serialized chunks and the
transport, separately for client and proxy.  The wsi transport is migrated
to use the new transport ops structs.

It will then be possible to "bring your own transport", so long as it is
reliable, and in-order, both for proxy and client / sspc.

We also adapt minimal-secure-streams-binance to build the -client variant
via SS proxy as well.

LWS_ONLY_SSPC is added so libwebsockets can be produced with just sspc
client support even for tiny targets.

A new embedded minimal example for rpi pico is also provided that
demonstrates using Serialized SS over a UART to an SS proxy, to implement
the SS Binance example on the pico, even though it has no networking itself.
2021-10-08 09:48:41 +01:00
Andy Green
135234bd39 plat: baremetal and rpi pico support 2021-10-08 09:48:41 +01:00
Andy Green
65f16d737e dsh-empty 2021-10-08 09:48:41 +01:00
Andy Green
43bb8aead0 dsh: coalesce 2021-10-08 09:48:41 +01:00
Andy Green
1dbf1d8148 freertos: suppress return check on xSemaphoreTake
With the timeout set to portMAX_DELAY, there is no timeout and so no way
for the api to return failure.

https://www.freertos.org/a00122.html

However Coverity doesn't understand this, and futher, Coverity usually
ignores (void) result casts.  So add needless checks and the corresponding
needless unwinding to the 10 uses of lws_mutex_lock() in smd.c.

Invert the return value to align it with pthreads mutex lock return
semantics.
2021-10-08 09:48:29 +01:00
Tero Turtiainen
1d2df8a8fe tls: clear unused warning on WITHOUT_SERVER
I’ve got an error when compiling libwebsockets on Mac with -DLWS_WITHOUT_SERVER=ON:

libwebsockets/lib/tls/tls.c:98:22: error: unused variable 'cx' [-Werror,-Wunused-variable]
2021-10-07 13:26:22 +01:00
Kenneth Mastro
3c89fdb52e wolfssl: adapt SNI for recent changes
It seems WOLFSSL_SNI_HOST_NAME is an enum in later wolfssl, use
the wolfssl define HAVE_SNI as well
2021-10-07 13:26:13 +01:00
Pavel Otchertsov
3cee5910ac context: fix compilation error 2021-10-07 13:25:40 +01:00
caobug
95a8d2903c uv: handle uv_poll_init failure 2021-10-07 11:03:12 +01:00
Chunho Lee
f440a67ec8 ss-mqtt: Add support for Birth message
This provides Birth message on SS policy. The Birth message is
a message published just after the MQTT connection has been
established.
2021-10-07 10:59:08 +01:00
Chunho Lee
fa50cf23b0 ss-mqtt: Skip SUBSCRIBE when MQTT session is resumed 2021-10-07 09:49:36 +01:00
Andy Green
97023b6512 main: set 4.3.99 2021-10-05 07:40:29 +01:00
Andy Green
a5aae049b2 v4.3.0 2021-10-05 07:40:17 +01:00
Pavel Otchertsov
d18aa1ee0b examples: fix sizeof lws_tls_cert_info_results in test_jwt_RS256 2021-10-05 07:40:17 +01:00
Andy Green
d447f8f1db client: connect: prefer default vh if none given
Giving NULL vh for the client connection is basically "don't care"....
prefer the "default" vh in that case
2021-10-05 07:40:17 +01:00
Andy Green
6cdaf85b89 ss: allow POLL from CONNECTING
Since CONNECTING is async and may take a while, there's nothing actually
wrong if the application asks to write again in the meanwhile and provokes
POLL.
2021-10-05 07:40:17 +01:00
caobug
90eb83a307 tls: ensure using ssl before doing tls_shutdown 2021-10-05 07:40:17 +01:00
Andy Green
ee15b82b6e cmake: unbreak LWS_WITH_SYS_STATE disabled build 2021-10-05 07:40:17 +01:00
=?UTF-8?q?M=C3=A4rt=20Laak?=
71b8f4dc68 windows: fix _lws_plat_file_seek_cur to update pos in fd
* needed to make fops_zip to work in windows
2021-10-05 07:40:17 +01:00
Andy Green
19ba1998fa tls: evolve handshake serialization into simultaneous_ssl_handshake_restriction
This patch adapts the recent change about serializing the number of
simultaneous tls handshakes allowed to 1, so you can set the number in the
context creation info, and the accounting for it is handled by counters
same as the overally tls restriction.

The name of the context info var to control it changes to simultaneous_ssl_handshake_restriction
which is now a count, the default 0 means no limit.

The count rejects tls connection attempts when the tls borrow is attempted,
and separately hands back the hs borrow from the tls borrow when the
connection attempt fails or succeeds.
2021-10-05 07:40:17 +01:00
Andy Green
ad990a61a0 ss: policy: unwind after policy syntax errors cleanly 2021-10-05 07:40:17 +01:00
Andy Green
8c7d541011 threadpool: SYNC timeout on netbsdBE
NetBSD Big-Endian on an RPi 3 + uSD is very slow, increase the threadpool
SYNC timeout a bit and normalize the task stop flow if it is exceeded.
2021-10-05 07:40:16 +01:00
Andy Green
0fda90c40a ws-server-threads-smp: modernize 2021-10-05 07:40:03 +01:00
Yucong Sun
ed8865e2b2 asyncdns: provide correct length with CCE 2021-10-05 07:10:10 +01:00
Andy Green
919981fba6 netlink: fix empty route index discovery 2021-10-05 07:10:02 +01:00
Andy Green
d069098683 conmon: async-dns: off-by-one 2021-10-05 07:09:55 +01:00
Andy Green
b6004e08c9 mqtt: allow indicating client_id is not on heap
Not sure why we don't leave any freeing to the caller, but since we don't
allow indicating that the provided client id should not be freed.
2021-10-05 07:09:47 +01:00