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

4414 commits

Author SHA1 Message Date
Andy Green
1a69afaf6e raw-file: clear POLLOUT before handling 2021-10-24 16:57:40 +01:00
Jin Wang
b43f90a8ed ss: policy: adaptations for dynamic policy 2021-10-21 16:14:02 +01:00
Orefkov Aleksander
63db023f58 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 17:24:07 +01:00
Jin Wang
e9c92ec161 metrics: ss: skip tagging if no ss streamtypename 2021-10-19 10:51:23 +01:00
Orefkov Aleksander
6c7798eef4 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:52 +01:00
Orefkov Aleksander
957bfae5c8 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:43 +01:00
Orefkov Aleksander
9efc32ab49 plugins: sshd: sc25519 must handle last bit
This was originally commented because Coverity objected to it.
2021-10-19 07:29:26 +01:00
Andy Green
d77a6c397e client: connect_check fail just log once 2021-10-19 07:29:13 +01:00
Andy Green
36af266001 adns: fix label limit check 2021-10-16 09:44:37 +01:00
Andy Green
50f7bd4f6e logs: unconvert adns wsi deref after potential close 2021-10-16 08:28:22 +01:00
Andy Green
55a7c6a0f4 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 05:33:56 +01:00
Andy Green
acb05eb1ca bind: use vhost log ctx since wsi optional 2021-10-16 05:33:41 +01:00
Andy Green
c95b0222a4 cmake: add inclusion of CheckIncludeFile in req 2021-10-16 05:33:33 +01:00
Andy Green
dcb115694a logs: log context: async_dns: no empty format string 2021-10-16 04:44:38 +01:00
Felipe Gasper
65faeab1bd 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-15 19:10:44 +01:00
Andy Green
06bc1d8971 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:10:33 +01:00
Felipe Gasper
826b221e38 client: fix nxdomain CCE 2021-10-15 14:15:12 +01:00
Felipe Gasper
ff5257e193 logs: migrate more to log context 2021-10-15 14:15:06 +01:00
Yichen Gu
9b56baca8f ss: static policy generator: fix filepath detection 2021-10-13 15:55:56 +01:00
Yichen Gu
61c2e3291f mqtt: protect printing debug only vars 2021-10-13 15:55:23 +01:00
Felipe Gasper
7fb6a450e8 logs: migrate ws extension code to contextual logging 2021-10-13 11:11:52 +01:00
Felipe Gasper
b53a09f61c logs: migrate client-parser-ws.c to contextual logging 2021-10-13 11:11:50 +01:00
Orefkov Aleksander
413ce239cd mbedtls: windows: add define to be compatible with the latest versions of mbedtls 2021-10-12 15:37:38 +01:00
Orefkov Aleksander
00b922041b mbedtls: set length even when LWS_HAVE_mbedtls_ssl_get_alpn_protocol 2021-10-12 09:46:32 +01:00
Orefkov Aleksander
c226da3e10 cmake: wrong miniz include dir + mbed link on windows 2021-10-12 09:46:28 +01:00
Andy Green
8d4526c780 smd: take message lock earlier 2021-10-12 09:46:17 +01:00
Felipe Gasper
fad2bdbeea Teach client-ws.c about log contexts. 2021-10-12 09:46:06 +01:00
Yichen Gu
3b4c9aaeb3 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:12:03 +01:00
Andy Green
361a07c8f4 minimal: esp32: wrover display: increase smd timeout to cover delays in display 2021-10-11 09:11:35 +01:00
Andy Green
df008ef6ce 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:49:58 +01:00
Pavel Otchertsov
05e9362df2 context: fix compilation error 2021-10-07 13:29:12 +01:00
caobug
a75fc1aae8 uv: handle uv_poll_init failure 2021-10-07 11:22:36 +01:00
Chunho Lee
bf5744ab07 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 11:22:21 +01:00
Chunho Lee
6decd5a7e7 ss-mqtt: Skip SUBSCRIBE when MQTT session is resumed 2021-10-07 11:22:08 +01:00
Tero Turtiainen
3b90c89bab 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-06 09:22:50 +01:00
Kenneth Mastro
3d7d180eb8 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-06 06:27:07 +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