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

61 commits

Author SHA1 Message Date
Andy Green
fd4667f508 esp32c3
Add
2021-08-28 07:24:14 +01:00
Andy Green
51490ae6e6 Fault injection
add lws_xos: xoshiro256 PRNG
2021-04-05 10:55:04 +01:00
Catalin
d5753b6298 tls: openssl-only: client-only: session caching 2021-04-04 05:34:11 +01:00
Andy Green
e2f42387b7 route: assert if route table becomes full 2021-04-02 16:50:49 +01:00
Andy Green
67eed51fea openbsd: fix up ctest 2021-03-17 07:31:30 +00:00
Andy Green
3f4623bb36 lws_metrics
There are a few build options that are trying to keep and report
various statistics

 - DETAILED_LATENCY
 - SERVER_STATUS
 - WITH_STATS

remove all those and establish a generic rplacement, lws_metrics.

lws_metrics makes its stats available via an lws_system ops function
pointer that the user code can set.

Openmetrics export is supported, for, eg, prometheus scraping.
2021-03-08 21:47:28 +00:00
Andy Green
c11a49c0b9 sai: solaris 2021-03-08 21:47:14 +00:00
Andy Green
b2a2e0871c sai: reduce make concurrency to avoid OOMs in VM 2021-03-05 13:13:48 +00:00
Andy Green
9af105ebf8 sai: xenial 2021-02-28 19:05:25 +00:00
Andy Green
cb5c0059a3 sai-resource 2021-02-24 08:56:27 +00:00
Andy Green
dc051fb2ae OpenBSD: various api ports 2021-02-17 11:39:15 +00:00
Andy Green
8e5f8491db opensslv3: handle deprecation of EC apis
openssl v3-alpha11 has marked EC_KEY pieces as deprecated... we use it in
LWS_WITH_GENCRYPTO but the related RSA etc pieces were already deprecated
for that.  We use EC_KEY pieces in vhost init...

The apis are not removed but deprecated, we should have a way to keep
trucking, but as it is the deprecation warning is promoted to an error.

Let's add LWS_SUPPRESS_DEPRECATED_API_WARNINGS option off by default.  If
enabled at cmake, external deprecated api warnings are suppressed.  This
gives a general workaround for now for opensslv3.

In addition, even if you don't do that, let's notice we are on openssl v3
and don't build the EC curve selection stuff, I don't think anyone is
actually using it anyway.
2021-02-17 11:39:15 +00:00
Andy Green
1f019f99f4 libressl: adapt type rules
Update libressl rules for options api type,
add some docs to build, use CHECK_SYMBOL_EXISTS since
CHECK_FUNCTION_EXISTS is fooled by the conditionals
in the headers
2021-02-17 11:39:15 +00:00
Andy Green
d73c4baab2 options: fixes
sai: add default-noudp and windows plats for noserver
2021-02-01 15:19:38 +00:00
Andy Green
334212ef2e windows: mbedtls: clean warnings 2021-01-29 21:22:35 +00:00
Andy Green
6497220e87 plugins: add LWS_BUILD_HASH to header and require match
Also prioritize LD_LIBRARY_PATH check for plugins first

Iterate through paths in LD_LIBRARY_PATH in order

Warn on failed plugins init but continue protocol init
2021-01-28 05:52:41 +00:00
Andy Green
d5618f6059 Wconversion: workarounds for CentOS7 2021-01-22 12:25:03 +00:00
Christian Fuchs
b961e5f351 eventlib: add sd-event support 2021-01-11 08:12:46 +00:00
Jed Lu
c82910d30c ss: auth: sigv4
Add SS pieces for Sigv4 auth support
2021-01-05 10:56:38 +00:00
Andy Green
a8d6ac8923 netbsdBE: enable ctest and fix test cert generation
NetBSD test server cert gen lacked a CN, add it for localhost

Enable Sai -j6 from -j4 for netbsdBE... it's slow but it is SMP

Add build in sai for secure-streams-proxy scenario
2021-01-05 10:56:38 +00:00
Andy Green
2e22393c4b sai: add minimal examples / ctest on DISTRO_RECOMMENDED 2021-01-05 08:33:32 +00:00
Andy Green
5570692cab sai: add SUL_DEBUGGING to osx m1 2021-01-04 05:40:12 +00:00
Andy Green
81bd0f8e55 sai: OSX target 10.15 2020-12-24 16:14:36 +00:00
Andy Green
67c50d0585 sai: restrict individual build parallelism 2020-12-24 16:14:36 +00:00
Andy Green
50d949dda9 sai: freebsd: reduce parallel from 12 to 3 for OOM 2020-12-24 16:14:36 +00:00
Andy Green
9b42fc6aae NetBSD: also need two-arg setpgid
Enable sai
2020-12-07 11:31:53 +00:00
Andy Green
050d23f0be sai: mac m1 2020-12-06 19:06:07 +00:00
Andy Green
8f68bc1fc8 sai: sspc proxy minimal examples 2020-12-01 15:38:20 +00:00
Andy Green
922b939521 h1only: fix assumption about h2 and add sai
Fix an assumption about h2 being around if h1 is that crept in.

Add a sai scenario to catch this kind of problem, only needs one
build since testing lws' own consistency... add WITH_MINIMAL_EXAMPLES
as well
2020-11-28 10:58:38 +00:00
Andy Green
b4e3bc381c sai: win10 no pthreads and debian buster 32-bit 2020-10-29 19:48:34 +00:00
Andy Green
c674181136 ss: fix without server 2020-10-29 19:41:08 +00:00
Andy Green
664992aea5 sai: plugins 2020-10-26 11:16:56 +00:00
Andy Green
0ba400ce81 sai: debian 2020-10-26 09:05:46 +00:00
Andy Green
c2271b4ec6 sai: tls: test openssl 3 without gencrypto
Gencrypto needs work to adapt against deprecated openssl 3 apis (about
100 apis).  But we can still test it without gencrypto, for use with
socket connections generally, where it is working.
2020-10-19 16:35:03 +01:00
Andy Green
643a001ed8 roles: netlink
This creates a role for RFC3549 Netlink monitoring.

If the OS supports it (currently, linux) then each pt creates a wsi
with the netlink role and dumps the current routing table at pt init.
It then maintains a cache of the routing table in each pt.

Upon routing table changes an SMD message is issued as an event, and
Captive Portal Detection is triggered.

All of the pt's current connections are reassessed for routability under
the changed routing table, those that no longer have a valid route or
gateway are closed.
2020-10-19 16:35:03 +01:00
Andy Green
67d24d7c00 cleaning 2020-10-19 16:35:03 +01:00
Orgad Shaneh
aa149e492b cmake: mingw: fix build with default options
afunix.h doesn't exist on mingw.
2020-09-18 11:37:17 +01:00
Andy Green
c6c7ab2b44 event libs: default to building as dynamically loaded plugins
Event lib support as it has been isn't scaling well, at the low level
libevent and libev headers have a namespace conflict so they can't
both be built into the same image, and at the distro level, binding
all the event libs to libwebsockets.so makes a bloaty situation for
packaging, lws will drag in all the event libs every time.

This patch implements the plan discussed here

https://github.com/warmcat/libwebsockets/issues/1980

and refactors the event lib support so they are built into isolated
plugins and bound at runtime according to what the application says
it wants to use.  The event lib plugins can be packaged individually
so that only the needed sets of support are installed (perhaps none
of them if the user code is OK with the default poll() loop).  And
dependent user code can mark the specific event loop plugin package
as required so pieces are added as needed.

The eventlib-foreign example is also refactored to build the selected
lib support isolated.

A readme is added detailing the changes and how to use them.

https://libwebsockets.org/git/libwebsockets/tree/READMEs/README.event-libs.md
2020-08-31 16:51:37 +01:00
Andy Green
629c8138b1 sai: freebsd 2020-08-10 15:04:10 +01:00
Andy Green
4cd381f933 cmake: tls: wolfssl
PARENT_SCOPE needs adjusting in a few places for wolfssl to work, and
we need a second level export of USE_WOLFSSL through lib/CMakeLists.txt

Add noi/f32 Sai build for WOLFSSL + MINIMAL_EXAMPLES
2020-08-10 15:04:10 +01:00
Andy Green
625bade63e ss: static policy: dynamic vhost instantiation
Presently a vh is allocated per trust store at policy parsing-time, this
is no problem on a linux-class device or if you decide you need a dynamic
policy for functionality reasons.

However if you're in a constrained enough situation that the static policy
makes sense, in the case your trust stores do not have 100% duty cycle, ie,
are anyway always in use, the currently-unused vhosts and their x.509 stack
are sitting there taking up heap for no immediate benefit.

This patch modifies behaviour in ..._STATIC_POLICY_ONLY so that vhosts and
associated x.509 tls contexts are not instantiated until a secure stream using
them is created; they are refcounted, and when the last logical secure
stream using a vhost is destroyed, the vhost and its tls context is also
destroyed.

If another ss connection is created that wants to use the trust store, the
vhost and x.509 context is regenerated again as needed.

Currently the refcounting is by ss, it's also possible to move the refcounting
to be by connection.  The choice is between the delay to generate the vh
being visisble at logical ss creation-time, or at connection-time.  It's anyway
not preferable to have ss instantiated and taking up space with no associated
connection or connection attempt underway.

NB you will need to reprocess any static policies after this patch so they
conform to the trust_store changes.
2020-07-21 12:43:32 +01:00
Andy Green
63c1e8ba00 esp32-wrover-kit
Add lws_display and minimal example support for esp32-wrover to match wsp32-heltec-wb32

Since no usable buttons that don't affect something else on wrover kit, assumes
a button to 0V on GPIO14.
2020-06-30 19:35:41 +01:00
Andy Green
57bfaa9ccb sai: disable opensslv3 check until after release 2020-06-30 19:35:41 +01:00
Andy Green
a0535d010c sai.json: reduce riscv qemu builds
These are really slow since the processor itself is emulated... if it's broken,
it will break on the most complex configurations, configuration conflicts will
be flushed out by building on native arch anyway.  So just build the complex
configuration on Risc-V.
2020-06-18 08:32:22 +01:00
Andy Green
ad5a4f7040 clean 2020-06-10 19:07:38 +01:00
Andy Green
2a772776a9 windows: for data exports use explicit extern
LWS_EXTERN needs to be empty for windows when declaring functions in the
headers.  But for data, it needs the explicit extern otherwise on windows
or mingw based builds, it thinks we are redeclaring the data each time.
2020-06-07 07:53:36 +01:00
Andy Green
f0c1ea801c mingw: fix for different sockfd type in udp example
As found by Sai
2020-06-06 15:53:58 +01:00
Andy Green
e3df1eaa74 sai: update to new tuple format 2020-06-05 08:33:51 +01:00
Andy Green
16cbbe2b40 mingw: update cross toolchain and add 32 and 64 default builds to sai 2020-06-03 09:36:20 +01:00
Andy Green
d84910da92 sai: fedora riscv 2020-06-02 08:37:10 +01:00