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

4776 commits

Author SHA1 Message Date
Jin Wang
312bb56385 ss: policy: adaptations for dynamic policy 2021-10-21 14:51:21 +01:00
Jin Wang
2670a971b9 metrics: ss: skip tagging if no ss streamtypename 2021-10-19 15:40:00 +01:00
Orefkov Aleksander
d1248188e0 pugins: sshd: handle window-change request
Added processing of window-change request, according to RFC 4254 6.7
https://datatracker.ietf.org/doc/html/rfc4254#section-6.7
For processing called callback pty_req with empty terminal and modes.
2021-10-19 15:39:53 +01:00
Orefkov Aleksander
2504eba456 plugins: sshd: channel fixes
In responses  with channel numbers, the sender's channel number is sent instead of the recipient's channel number.
See for example https://datatracker.ietf.org/doc/html/rfc4254#section-5.1
Putty uses channel 256 for session, and existing code break it with "Received SSH2_MSG_CHANNEL_OPEN_CONFIRMATION for nonexistent channel 0" error.
2021-10-19 10:50:09 +01:00
Orefkov Aleksander
4c5e7a37df plugins: sshd: mbedtls 3 extra adaptation
In fresh mbedtls rsa public decrypt is deprecated and not work on public keys.
Replaced by lws_genrsa_hash_sig_verify.
2021-10-19 10:50:01 +01:00
Orefkov Aleksander
e34e6fe263 plugins: sshd: sc25519 must handle last bit
This was originally commented because Coverity objected to it.
2021-10-19 06:38:45 +01:00
Andy Green
9127bcde7f client: connect_check fail just log once 2021-10-19 06:32:19 +01:00
Andy Green
a3592cbe4f adns: api-test: add synthetic result parsing
Add some exports so the api test can inject results into the parser for
live queries, suppressing asking the server but otherwise following the
flow.

Provide two new suspect responses for injection and parsing in ctest.

Add a --cos option to minimal-http-client to force a close after the
connection has started the async dns.
2021-10-18 09:58:16 +01:00
Andy Green
a51def06a1 coverity: adns: check length against 1500 2021-10-17 12:03:07 +01:00
Andy Green
66afd3da78 coverity: client_reset: no longer any way to get NULL *pwsi
Coverity belatedly noticed that client_reset no longer changes *pwsi
2021-10-17 12:03:07 +01:00
Andy Green
8f05195368 readme: add news about Felipe Gasper's perl binding 2021-10-17 12:03:07 +01:00
Andy Green
d730351fa3 adns: fix label limit check 2021-10-17 12:02:26 +01:00
Andy Green
28e5d41d9e http: sse: check POLLIN during DOING_TRANSACTION
When the client goes away, on some platforms all we get is POLLIN revent
stuck on... we have to read it to find out a zero length result and
understand it's gone.

Add SSE mode's DOING_TRANSACTION to the list of states we will read for.
2021-10-16 08:23:21 +01:00
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