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
Andy Green
99a8b9c442 cmake: remove duplicate LwsCheckRequirements 2022-03-15 10:28:09 +00:00
Chunho Lee
3af7a16531 ss: mqtt: add support for retained message 2022-03-15 10:28:09 +00:00
Andy Green
4bf39f55d4 h2: improve logging for zero length DATA with EOS 2022-03-15 10:28:09 +00:00
Andy Green
b9e290d70a ss: http: unreachable superfluous if we did DISCONNECTED 2022-03-15 10:28:09 +00:00
Andy Green
ba2441585d 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-03-15 10:28:09 +00:00
Chunho Lee
f57d84f6fc minimal: ss: mqtt: update certificate
test.mosquitto.org mutual auth certs only have a 6mo lifetime...
2022-03-15 10:28:09 +00:00
Chunho Lee
a34e60581c minimal: ss: policy2c: add more MQTT related fields
This adds 'aws_iot', 'birth_topic', and 'birth_message'
on policy2c.
2022-03-15 10:28:09 +00:00
Chunho Lee
3a98dbb918 ss: mqtt: fix wrong QoS value on Birth message 2022-03-15 10:28:09 +00:00
Sylvain Saunier
84956d280a route: fix nl groups and local ipv6 ads 2022-03-15 10:28:09 +00:00
Andy Green
442f9aeaa8 coverity: mark false positive 2022-03-15 10:28:09 +00:00
Andy Green
d892b86b93 lws_flow helpers
Add a generic struct to manage a buflist with an incrementally-consumable
head, and helpers to deal with retiring the last segment and starting the
new head.

The lws_flow is added to using the buflist member directly, it autohandles
SS window management to try to keep the total buffered at the client to the
window member limit.
2022-02-22 14:37:31 +00:00
Andy Green
9b92c47101 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-22 14:37:31 +00:00
Andy Green
3bfb854503 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-22 14:37:31 +00:00
Andy Green
dd1e07b28a ss: hello_world uses default policy
This switches the current hello_world to be hello_world-policy now,
and hello_world is simplified to use the __default policy without any
explicit policy of its own.

Using the default policy means it relies on the system tls library to
validate the tls connections using system trust arrangements, that won't
work in cases where the configured tls library does not have its own trust
store.
2022-02-22 14:37:10 +00:00
Andy Green
91c6667c04 ss: default policy
Just like there is a default protocol provided if none is specified that is
suitable for handling http GET, introduce a default SS policy that is also
suitable for the case of http GET where the user trusts the CA using the
ssl library or system trust store.
2022-02-22 14:35:43 +00:00
Andy Green
0ca97586d6 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 11:09:48 +00:00
Rosen Penev
2f93a8b178 genec: show correct nid when not allowed
As noticed by gcc11 warning

https://github.com/warmcat/libwebsockets/pull/2551
2022-02-01 09:13:58 +00:00
yogpstop
2148becb3a http: lws_add_http_header_by_name: add colon if needed 2022-01-27 13:08:35 +00:00
Andy Green
5124ffe9d4 openssl: x509: truncate CN in presence of other attr
https://github.com/warmcat/libwebsockets/issues/2542
2022-01-26 11:54:08 +00:00
Andy Green
e5e1b34f84 logs: lock log context refcount changes
Enabling the locking requires -DLWS_MAX_SMP=2 or more.
2022-01-26 11:54:08 +00:00
Andy Green
176b2ca5a1 logs: openssl session: improve detection of INFO enabled
https://github.com/warmcat/libwebsockets/issues/2540
2022-01-26 11:53:54 +00:00
Andy Green
6352fee219 sort-dns: fix scope comparison
https://github.com/warmcat/libwebsockets/issues/2537
2022-01-16 10:48:16 +00:00
Andy Green
8dc438ce2c 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 10:48:16 +00:00
Sylvian Saunier
38a39a3710 client: support socket source port setting 2022-01-16 10:48:16 +00:00
Sylvian Saunier
b3ec5a0a4e client: support socket reuseaddr 2022-01-16 10:48:16 +00:00
Ferenc Gerlits
133063fc68 cmake: fix compilation with OpenSSL subproject
https://github.com/warmcat/libwebsockets/pull/2535
2022-01-16 10:48:16 +00:00
Andy Green
7e841130e0 coverity fixes 2022-01-16 10:48:11 +00:00
Michael Drake
781c6f3227 base64: prevent writing null char into zero length output buffer
This allows handling of the unusal but foreseeable situation were
the client provides a zero length output buffer, for example, if
the input buffer was also zero length.
2022-01-10 14:21:33 +00:00
Michael Drake
c735a9f383 docs: add return value documentation for base64 decode 2022-01-10 14:20:26 +00:00
Andy Green
fdef0a2dd0 threadpool: adjust sync wait budget up 2022-01-10 04:37:15 +00:00
Andy Green
65768cf3eb dll2: add api for inserting afer existing member 2022-01-04 16:08:50 +00:00
Andy Green
8b16aa18c8 minilex: add improved generic version in misc
Leave the http minilex as it is, and add an improved version in lib/misc

 - get a list of strings from stdin and emit C header to stdout

 - support ambiguous terminals (xxx and xxx-something) correctly regardless
   of introduction order

 - add generic parser in lib/misc

minilex doesn't build as part of lws since it's only needed by developers,
there's a one-line build documented at a comment at the top of
lib/misc/minilex.c
2022-01-04 16:08:44 +00:00
Andy Green
236512687e dsh: msvc refuses void pointer arithmetic 2021-12-23 06:22:54 +00:00
Andy Green
bea294dd26 http: redirect: keep ssl options at redirect 2021-12-23 06:22:48 +00:00
Andy Green
7b82498d33 esp32: update against Dec 21 idf
Freertos in idf has moved around a bit.
2021-12-23 06:20:27 +00:00
chenzhongaaron
27f8affcd0 qnx: toolchain file and adaptations
https://github.com/warmcat/libwebsockets/issues/2527
2021-12-15 13:28:23 +00:00
Paul Lee
05c67c1879 service: make sure to sleep if nothing to do
https://github.com/warmcat/libwebsockets/issues/2524
2021-12-14 06:58:11 +00:00
chilL1n
1418042935 docs: lws_service_tsi 2021-12-13 20:32:50 +00:00
Vitaliy Orazov
05997f4503 http: proxying: allow for large headers
set the buffer size (rpath) for header processing during
 proxying equal to the value in max_http_header_data
2021-12-13 19:02:56 +00:00
Andy Green
0dae22e4dd logging: gate_accepts: reduce verbosity 2021-12-13 19:02:56 +00:00
Andy Green
f7aff789ca cancel pipe: mark close when wsi is close 2021-12-13 19:02:56 +00:00
Joerg Wendel
fe8170dcdc http: server: added no-cache handling to mounts 2021-12-13 19:02:56 +00:00
Andy Green
b8c4820be4 openssl: support SSLKEYLOGFILE client secret logging
This patch checks for the env var SSLKEYLOGFILE=path, if present, then
client connection tls secrets are appended into path.vhostname.

This allows decryption of captured encrypted data for debugging purposes.

SSKEYLOGFILE=path env var method is the same as provided by Firefox and
Chrome for this purpose.
2021-12-13 19:02:49 +00:00
DerKleinePunk
e88a1b1b32 http: cookie_get
The loop check shouldn't care about bl any more, since we snipped bl from n
already.
2021-12-02 09:21:27 +00:00
Vitaliy Orazov
5747203406 http proxy: support PUT, PATCH and DELETE methods 2021-11-29 15:18:16 +00:00
Andy Green
3feddc06a4 examples: lgtm fixes now on by default 2021-11-29 15:18:15 +00:00
Andy Green
00e24e11ee docs: decruft README.coding 2021-11-29 05:39:47 +00:00
Daniel
59abab0e79 extpoll: make sure DEL_POLL_FD only coming once
https://github.com/warmcat/libwebsockets/issues/2500
2021-11-22 15:44:53 +00:00
Andy Green
ba89af373b async dns: allow multiple servers and public add remove apis 2021-11-17 14:50:08 +00:00
Andy Green
ac5bb1c47f h2: post: do not try to bind origin for files 2021-11-17 14:50:05 +00:00