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

36 commits

Author SHA1 Message Date
Andy Green
f00194c321 lws_dsh 2019-08-12 12:45:31 +01:00
Andy Green
84a57540ab LWS_WITH_NETWORK: cmake option for no network code 2019-01-13 07:54:57 +08:00
Andy Green
eda102e397 jwe 2018-12-27 06:45:32 +08:00
Andy Green
a3dcc95471 genec: generic ECDH crypto layer
!!! WIP

This implements the "genec" layer wrapping mbedtls + openssl
ECDH support.

API tests are added for the parts that are implemented so far.

Stuff related to ec at all, like keys, are prefixed lws_genec_.
Stuff specific to ECDH are prefixed lws_genecdh_.
2018-12-27 06:45:31 +08:00
Andy Green
ddb94d4e27 genaes: generic AES layer independent of tls library
Although RSA can be used directly for signing / JWS
on large chunks of data since it's only operating on
the hash, when JWE support arrives, which allows bulk
encryption, it's going to be mandatory to support
secondary AES ciphers to use on the bulk data.

This adds generic support for all AES modes that OpenSSL
and mbedTLS have in common, works on both mbedTLS and
OpenSSL the same, and adds unit tests for each mode
in api-test-gencrypto, to run in CI.
2018-12-27 06:45:31 +08:00
Andy Green
47e10ab200 dbus-ws-proxy
This builds on the new dbus role support to provide a minimal example proxy
between ws and dbus.

A client app is provided that asks the proxy to connect to libwebsockets.org
and proxy the drawing data from the mirror example there back to the dbus
client using dbus messages.
2018-10-13 08:16:27 +08:00
Andy Green
ebed5e74cb threadpool 2018-09-11 18:27:59 +08:00
Andy Green
1ea3ef7894 travis: handle reduced max run time by splitting autobahn tests across two instances 2018-05-25 15:33:28 +08:00
Andy Green
bce8cca042 refactor: also migrate tls to the ops struct and private.h pattern
Several new ops are planned for tls... so better to bite the bullet and
clean it out to the same level as roles + event-libs first.

Also adds a new travis target "mbedtls" and all the tests except
autobahn against mbedtls build.
2018-05-02 12:10:36 +08:00
Andy Green
25e27d76d1 travis: refactor the yml and add smp-specific tests 2018-04-27 14:22:58 +08:00
Andy Green
ae688609a0 qa: add 6 x h2load tests 2018-04-27 11:19:09 +08:00
Andy Green
5d06f610a9 travis: h2spec integration 2018-04-26 15:27:02 +08:00
Andy Green
27e86e2641 cmake: allow setting LWS_ROLE_WS
You can build lws without support for ws, with -DLWS_ROLE_WS=0.

This is thanks to the role ops isolating all the ws-specific business
in the ws role.

Also retire more test apps replaced by minmal-examples.
2018-04-25 08:42:18 +08:00
Andy Green
7b227eb333 autobahn fixes
This replaces the old test-app for echo with separate client and server
minimal versions.

The autobahn test script is made more autonomous and tests both
client and server.
2018-04-22 06:45:46 +08:00
Labunsky Artem
3459d4fe43 Removing rudimental n1 variable
There is no real need in n1, since it used in only at one place once.
Also it will prevent "variable ‘n1’ set but not used [-Werror=unused-but-set-variable]" error on build with -DLWS_MAX_SMP=N, where N > 1.

AG: also add LWS_MAP_SMP != 1 test to travis to catch this kind of thing sooner
2018-04-21 10:24:44 +08:00
Andy Green
8829c2f365 selftests
This converts several of the selftests to return a status in their exit code
about whether they 'worked'.

A small bash script framework is added, with a selftest.sh in the mininmal
example dirs that support it, and a ./minimal-examples/selftests.sh script
that can be run from the build dir with no args that discovers and runs all
the selftest.sh scripts underneath.

That is also integrated into travis and the enabled tests must pass now for
travis to pass.  Travis does not have a modern libuv so it can't run a
couple of tests which are nulled out if it sees it's running in travis env.
2018-04-19 16:16:48 +08:00
Andy Green
e4a3e8c4d4 LWS_WITH_MINIMAL_EXAMPLES: default-off build all minimal samples after lws for QA
This adds an lws cmake option that builds all the minimal examples as part of lws,
it's useful for QA.

It adds a macro to examples that depend on a particular lws configuration to understand
they should just null out their project definition in builds where the lws configuration
requirement is not met, and we are building as part of lws.

It also adapts all the example library additions to select the just-built-but-not-yet-installed
library in the case it is built as part of lws.  If built standalone, it now uses the cmake
platform-abstracted way to add the library requirement too.
2018-04-06 10:38:03 +08:00
Andy Green
48be844e5b travis: use trusty 2018-01-03 09:28:42 +08:00
Andy Green
5b74d7108b gcov: add in cmake and adapt defaults
1) Introduce LWS_WITH_GCOV to build with gcc / clang coverage instrumentation.

$ cd build
$ make clean && rm -f `find . -name "*.gcno" -o -name "*.gcda"` && make -j16 && sudo make install && sudo /usr/local/bin/libwebsockets-test-server -s
...
$ gcov `find . -name *.c.gcno | grep -v test-apps` -b | sed "/\.h.\$/,/^$/d"

The above are available in two helper scripts

 - scripts/build-gcov.sh
 - scripts/gcov.sh

2)

CMake defaults changed:

 - LWS_WITH_ZIP_FOPS: OFF
 - LWS_WITH_RANGES: OFF
 - LWS_WITHOUT_EXTENSIONS: ON
 - LWS_WITH_ZLIB: OFF

New CMake controls that default-OFF:

 - LWS_WITH_GENHASH
 - LWS_WITH_GENRSA

these are implied by LWS_WITH_JWS (which is implied by LWS_WITH_ACME)

3) rename ./lib/tls/XXX/server.c and client.c to XXX-server.c / XXX-client.c.

This is because gcov dumps its results using the .c filename part only,
the copies overwrite each other if there are different .c files in the tree
with the same filename part.

4) Add onetime test-client mode and test to ./test-apps/attack.sh

5) Add gcov howto in READMEs/README.build.md using attack.sh
2017-12-01 11:37:35 +08:00
Andy Green
3ec7c1ab21 ACME client plugin
This adds support for a plugin that can be attached to a vhost
to acquire and maintain its TLS cert automatically.

It works the same with both OpenSSL and mbedTLS backends, but
they can't share auth keys, delete the 'auth.jwk' file as it is
in the example JSON when switching between libs
2017-12-01 11:37:35 +08:00
Andy Green
bb04883097 travis: add mbedtls + http2 variant 2017-10-25 07:17:29 +08:00
Andy Green
4f267c515e clean up top level of project 2017-09-27 08:24:05 +08:00
Andy Green
19a320a578 http2: remove cmake option leave code in for now
https://github.com/warmcat/libwebsockets/issues/979
2017-07-25 17:36:31 +08:00
Jesse Engle
61cc61817e Subject: Eliminated 'unused variable' compiler warning generated with -DLWS_WITH_NO_LOGS=ON.
The unused variable was only declared for use in a log macro that's
compiled out with the above compiler switch. I removed the declaration
and casted the variable at each use in the block.

AG: convert to void case reference irrespective of logging enabled.
AG: travis.yml: add -DLWS_WITH_NO_LOGS=ON that also enables lwsws + cgi code
2017-07-19 04:11:57 +08:00
Andy Green
4d79dc553e travis: explicitly point to openssl on osx
One day this started failing at CMake autofind. This forces it to look at the right place.
2016-10-05 10:15:24 +08:00
Andy Green
020770566e plugins
This adds support for dynamically loaded plugins at runtime, which
can expose their own protocols or extensions transparently.

With these changes lwsws defaults to OFF in cmake, and if enabled it
automatically enables plugins and libuv support.

Signed-off-by: Andy Green <andy@warmcat.com>
2016-04-07 09:38:08 +08:00
Andy Green
1a13885afd cgi env
Improve cgi support so it's capable of running cgit
2016-03-21 15:17:33 +08:00
Andy Green
9b780806f0 travis coverity update
Signed-off-by: Andy Green <andy.green@linaro.org>
2015-12-06 10:43:02 +08:00
=?UTF-8?q?Joakim=20S=C3=B6derberg?=
7ef8855530 Subject: [PATCH] Attempt at fixing Travis for OSX.
Move install into external shell script. We cannot use apt-get on OSX, use brew instead... Also valgrind isn't used at the moment so skip intalling it.
2014-12-13 12:23:41 +08:00
Joakim Soderberg
a38a8cf8d1 Subject: [PATCH] Fix the travis.yml to build everything
When fixing the indentation for the coverity chagnes in 924bcfbc99
the build matrix got turned off. This re-enables this.

Also change from using gcc/clang. What we want is to build on both Linux
and OSX. Not just run Linux with gcc+clang.

However to enable multi-os support one has to mail the travis support:
http://docs.travis-ci.com/user/multi-os/

"This feature needs to be enabled manually. If you wish to take advantage
of this feature, please send email to support@travis-ci.com, indicating
which repository you would like to have it enabled."
2014-12-10 10:10:20 +08:00
Andy Green
924bcfbc99 coverty travis fix env indentation
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-11-30 11:52:40 +08:00
Andy Green
f1e52361c5 coverity travis add key
Signed-off-by: Andy Green <andy.green@linaro.org>
2014-11-30 11:24:01 +08:00
=?UTF-8?q?Joakim=20S=C3=B6derberg?=
6b6f1e188d Subject: [PATCH] Add support for coverity static analysis scan.
http://www.coverity.com
2014-11-30 10:58:52 +08:00
Joakim Soderberg
ced66021f4 Add libev dependecny 2014-11-26 01:23:34 +08:00
Joakim Soderberg
4eb182f873 Remove lcov depdency 2014-11-26 01:23:13 +08:00
Joakim Soderberg
3476e0ce10 Added travis support 2014-11-26 01:22:37 +08:00