Coverity does not understand that once we checked that the header has
a non-zero length, the associated pointer can never be NULL. Add a
pointless check to make it happy.
continue here makes no difference than using break, but continue gets us a
pointless complaint "statement continue does not have any effect" and break
does not.
Coverity gets antsy that we were checking wsi->a.protocol for NULL earlier
then start using it... explicitly bail if it's NULL before we start using
it.
->san is a union, in this case we set the type to indicate we use
SAN_OTHER_NAME member, but set the unstructured_name union member, that is
smaller.
This doesn't cause any problem, since the union has space for it. But
Coverity noticed, it is wrong, so fix it.
Coverity doesn't understand that since we already handled
akid.keyIdentifier.MBEDTLS_PRIVATE(len) being zero, we don't need to
check for akid.keyIdentifier.MBEDTLS_PRIVATE(p) being NULL.
So explicitly check it, even though it is a NOP.
We also need to report CGI_TERMINATED when reaping children that closed by
themselves. Keep an extra copy of the pid outside of the lws_spawn object
so it's still around by then.
The sshd example has gotten crufted a few different ways.
Adapt the test-sshd protocol and callbacks to not collide with the plugin
ssh-demo exports, for BUILTIN case.
Do not build a static copy of ssh-base for test-sshd if PLUGINS_BUILTIN is
going to provide it via lws import.
Add pvo for ssh-base to enable it on to the test-sshd vhost.
Banner staging in buf[] shared some of source and dest when it was copied
in, move it up a bit to avoid this.
Add note about rsa key disable workaround on Fedora.
test-sshd uses CGI (and requires it enabled to build) because it predates
lws_spawn... lws cgi was migrated to lws_spawn, really the test=sshd needs
rewriting to use lws_spawn directly instead of cgi.
For plugins that handle PROTOCOL_INIT, we have to iterate any PLUGINS_BUILTIN
plugins as if we had just discovered and loaded them from plugin files, so
they bind to vhosts appropriately.
Add some private helpers to keep the guts from duplication in plat.
This adds an optional feature LEJP_FLAG_FEAT_OBJECT_INDEXES that changes
lejp to treat { } items as indexable in ctx->i[] / ctx->ipos, since they
also can take commas.
This may break existing uses so it requires the default-off feature flag to
enable it. The flags context field is zeroed by lejp_construct(), so any
flags should be set on ctx->flags after alling that.
There's also a flag LEJP_FLAG_LATEST available as an alias to enable any
desirable but not-backwards-compatible behaviour, including this.
Add the info to the README and adapt the unit test to do it both with and
without the FEAT_OBJECT_INDEXES flag.
Pick some common errno constants for the platform and provide strings for
them. Replace numeric errno logging with the new api for client.
Replace any usage of strerror() in network code with the new api. For
constrained devices, this should give a small saving on .rodata.
Leave some usages in daemonize.c and unix plat where the size isn't going
to matter.
async-dns has to keep a listener on udp:53, but its tag doesn't really give
a clue what it is
[1534033|wsisrv|0|adopted]
this patch improves it and moves the decision about putting the server wsi
in SERVER or MUX group to the caller instead of guessing from the desc
name.
[1549684|wsisrv|0|system|asyncdns]
There's no problem for library build, also with LWS_WITH_MINIMAL_EXAMPLES,
but after install at least on OSX, there are problems finding the installed
lws include dir (concealed on most platforms by the path being in the
default search list for the toolchain), and the references in the lws
includes to the tls includes meaning that explicit paths for that must be
available at consuming cmakes.
This patch enhances the cmake config installed by lws to deal with adding
the lws include paths to CMAKE_REQUIRED_INCLUDES and include_directories,
so it can be found before the target is introduced.
The tls include is passed back up the CMakeLists layers and the lws targets
marked with target_include_directories(PUBLIC) with them, so they are
understood as needed by consumers.
More boilerplate is moved out of the example consuming cmakes.
After this, on machines with previous installs of older lws, you may have to
clean out the cmake install path, that is usually something like
/usr/local/lib/cmake/libwebsockets/*
before make installing lws and putting the latest content in there.
Adds an example for NXP RT595S eval board, using serialized SS over CDC /
ACM USB composite device, one ttyACM for logs and the other for the SSS
link.
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.
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.
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.
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.
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.