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
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
oaleshina
17199959aa h2: ping pong: separate payloads
https://github.com/warmcat/libwebsockets/pull/2413
2021-10-05 07:09:37 +01:00
Andy Green
733f0c10f0 mbedtls: fix validation
mbedtls validation was broken by an earlier patch on main... fix it and add
a CI test also using the wrong CA cert so this can be caught straight away
from now on.
2021-10-05 07:09:13 +01:00
Andy Green
2c2b3b62c2 README.md: update with work retrospective and more Sai info 2021-10-05 06:48:26 +01:00
Andy Green
3e54c84a18 ss: mass update LE root to isrg part 2 2021-10-05 06:48:03 +01:00
Andy Green
c38567960a dsh: remove foreign support
We're going to refactor dsh to not have foreign support, let's remove it in
one step.
2021-10-04 12:59:27 +01:00
Andy Green
1e56dc9642 ss: http: defend against CONNECTED-CONNECTED 2021-10-04 12:55:45 +01:00
Andy Green
a0e60304a4 ss: h1: defeat CCE if told CONNECTED 2021-10-04 12:55:45 +01:00
Andy Green
9ff83d9e75 ss: h1: be sure to go through DISCONNECTING if CCE 2021-10-04 12:55:45 +01:00
Andy Green
65a954a9c4 ss-h1: reset message state for repeated use
This lets one "opportunistic" mode http policy SS be able to be used
multiple times.
2021-10-04 12:55:45 +01:00
Andy Green
005e130393 h2: make has_buffered_out check nwsi 2021-09-13 15:15:31 +01:00
Andy Green
d075d4f9ca ctest: increase timeouts on tests using warmcat 2021-09-09 15:27:41 +01:00
Andy Green
27fac9dd86 warn: avoid one toolchain false positive 2021-09-09 15:27:41 +01:00
xionghui
365328c4d3 http server: allow serving files with special unicode path 2021-09-09 15:27:27 +01:00
Biswapriyo Nath
cced56b2ad Subject: [PATCH] cmake: Install pkgconfig files in mingw 2021-09-09 07:27:31 +01:00
Andy Green
372fdc7184 cancel pipe: make sure we closed it on destroy with no EVENTFD case 2021-09-09 07:27:31 +01:00
Andy Green
132833a25b openssl: enable skipping deprecated api warnings for now 2021-09-09 07:27:31 +01:00
Andy Green
a8a443e645 wolfssl: update gencrypto 2021-09-08 09:42:11 +01:00
Andy Green
0c94138fd3 tls: handle WANT_WRITE via POLLOUT to POLLIN 2021-09-02 16:43:18 +01:00
Andy Green
3892a9d21c h2: bulk rx: deal with window
We don't always keep updating the rxflow window on bulk rx, and just run
down the initial.  This keeps us going with 64K in flight
2021-08-31 05:45:40 +01:00
Austen Stone
f6954e432c http: custom hdr: add custom name iterator 2021-08-31 05:45:40 +01:00
Andy Green
4d81fee54f validity: take context and pt lock before close 2021-08-31 05:45:40 +01:00
Andy Green
572e7e03e5 http: hdr: sync lws_hdr_total_length with lws_hdr_copy 2021-08-31 05:45:40 +01:00
Andy Green
06e881aad6 esp32c3
Add
2021-08-31 05:45:40 +01:00
Andy Green
d4dd7cb695 esp-idf: update againt 2021-08-06 head 2021-08-31 05:45:40 +01:00
Andy Green
81a3ca3e84 ss: port binance example 2021-08-31 05:45:40 +01:00
Andy Green
c34e24392e docs: update changelog and README 2021-08-31 05:45:40 +01:00
Andy Green
4db2ff872b cose: keys and signing + validation
Support for COSE keys and signing / validation

 - lws_cose_key_t and import / export / generation apis for EC / RSA / SYMMETRIC

 - cose_sign1 ES256/384/512,RS256/384/512 sign + validate, passes RFC8152 WG tests sign1-tests
 - cose_sign  ES256/384/512,RS256/384/512 sign + validate, passes RFC8152 WG tests sign-tests
 - cose_mac0  HS256/HS256_64/384/512      sign + validate, passes RFC8152 WG tests hmac-examples
 - cose_mac   HS256/HS256_64/384/512             validate, passes RFC8152 WG tests hmac-examples

 - lws-crypto-cose-key commandline tool for key / key set dumping and
   creation
 - lws-crypro-cose-sign commandline tool for signing / validation

 - lws-api-test-cose - large number of test vectors and tests from RFC8152
2021-08-31 05:45:35 +01:00
Andy Green
dcaa0013b4 lecp: add CBOR stream parser LECP like JSON LEJP
This provides very memory-efficient CBOR stream parsing
and writing.

The parser  converts pieces of CBOR into callbacks that define
the structure and collate string and blobs into buffer chunks
for extensible and easy access.

It is fragementation-safe and does not need all the CBOR in
the same place at one time, chunks of CBOR are parsed and
discarded as provided.

It does not allocate and just needs a few hundred bytes of
stack for even huge CBOR objects.  Huge strings and blobs
are handled without needing memory to hold them atomically.

Includes ./minimal-examples/api-tests/api-test-lecp that
unit tests it against 82 official example CBORs and
26 additional test vectors from COSE (just checking the CBOR
parsing).

The writing apis allow printf style semantics with a variety
of CBOR-aware %-formats.  The apis write into a context that
manages output buffer usage, if the output buffer fills,
then the apis return with an AGAIN code that lets you issue
and reset the output buffer and repeat the api all to issue
more output.  The subsequent calls can occur much later or
from a different function context, so this is perfect for
WRITEABLE-mediated output from the network parts of lws.

See ./READMEs/README.cbor-lecp.md
2021-08-21 17:44:40 +01:00
Yichen Gu
b31c5d6ffe http: cookies: support cookie jar in and out 2021-08-21 17:44:40 +01:00
Andy Green
b67d192100 lws_map 2021-08-21 17:44:40 +01:00
Andy Green
6ab149b5d3 evlib: remove PREPARE_DELETION as cruft 2021-08-21 17:44:34 +01:00
Andy Green
f6911cdab8 minimal: perf: add --test404[red] switches
--test404 sends us instead to httpbin.org/status/404
 --test404red goes to warmcat.com/noexist.html which is handled as a
              redirect to a 404 page (served with a 200...), streamtype
              allows redirects to be followed
 --test404redref same as above but streamtype disallows redirect follow

These should all produce CONMON results for the first response, be it 404
or 302 and whether the 302 was followed or not, and whether the client
goes via the proxy or not.
2021-08-19 10:02:16 +01:00
Andy Green
1b9ef51a95 conmon: make sure we report http specific on close 2021-08-19 10:01:56 +01:00
Andy Green
6953958fc3 http: redirect: make sure we keep wsi opaque 2021-08-19 10:01:53 +01:00
Andy Green
33d06386ff ss: CREATING to TIMEOUT is possible with sspc and active timeout 2021-08-19 08:10:54 +01:00
Andy Green
31bbeb520d minimal: eventlib-custom: handle fds removal in service
https://github.com/warmcat/libwebsockets/issues/2388
2021-08-19 05:31:15 +01:00
Gopi Rao
1348632d14 h2: plat: fix plat SETTINGS override
The FREERTOS plat has its own h2 SETTINGS, but although they are used, they
get overridden with the lws default SETTINGS during pt init.

Let's not do that if someone else has already touched the context set.
2021-08-19 05:31:15 +01:00
Andy Green
5de5ee74bf ss: lws_ss_client_connect also only pass up return
We removed the _lws_ss_handle_state_ret_CAN_DESTROY_HANDLE() from
request_tx, hane to do the same for lws_ss_client_connect()
2021-08-19 05:31:15 +01:00
Andy Green
af501eab1a windows: plat: only build client ctx init if WITH_TLS
https://github.com/warmcat/libwebsockets/issues/2385
2021-08-19 05:31:15 +01:00
Andy Green
708903cb47 minimal: eventlib: custom: add client demonstration 2021-08-19 05:31:15 +01:00
Andy Green
43f290adbc sspc: add LWSSSCS_UPSTREAM_LINK_RETRY state
Add a transient state that indicates that we are retrying an upstream link
before the sspc creation can proceed.

The state() ack paramemeter shows the number of ms we have been retrying.

This is only issued if proxy mode clients are having difficulty reaching
their proxy, and are retrying.

As a transient state it doesn't affect the ss overall state, which will not
have reached CREATING yet.
2021-08-19 05:31:15 +01:00
Andy Green
770dc7bc85 client: connections: add detailed dynamic CCE info
Let's improve the details returned in CLIENT_CONNECTION_ERROR in string so
we can get more clues about the problem.  Create dynamic strings that
classify at what step the error happened, and add dynamic info like the
errno.
2021-08-19 05:31:15 +01:00
Andy Green
0043ea5d44 ws: check protocol before debug log 2021-08-19 05:31:15 +01:00
Andy Green
5b8a597c1d server: http-proxy: fix POST 2021-08-19 05:31:15 +01:00
Andy Green
e49a5f3698 sai: centos8-aarch64 2021-08-19 05:31:15 +01:00
Andy Green
6d8c4a7bdd sai: debian 11 2021-08-19 05:31:15 +01:00
Andy Green
79c8d6be17 sai: rejuvenate netbsd/aarch64BE and add netbsd/x64_64-amd 2021-08-19 05:31:15 +01:00
Andy Green
568fa014ce lws_struct: add CHILD_PTR setting 2021-08-19 05:31:15 +01:00
Andy Green
37f3244076 conmon: add dns and protocol_specific
This adds an indication of dns disposition to the conmon results,
and for http, if it gets that far a protocol-specific indication
of http response code.
2021-08-19 05:31:04 +01:00