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

216 commits

Author SHA1 Message Date
Andy Green
5013162b1e abstract: existing connection compare 2019-10-10 16:34:37 +01:00
Andy Green
6a6f365ce7 semmle: fix warnings
They're all cosmetic or minor js stuff.

Add related shield.io icons to README.
2019-09-22 09:35:07 -07:00
Andy Green
d3aa28c2db server-status: still produce valid json if files cant be opened
Kernel update changed the /sys path for temp monitoring... the status had
already emitted a , in the json committing it to make a new entry, but the
code skips making it if the file can't be opened.

Change it to produce "(unknown)" in that case.
2019-09-22 03:08:36 -07:00
Andy Green
7528491505 raw-proxy: don't defer to raw-skt if we wanted raw-proxy
At some point raw-skt became the default that overrode
the raw-proxy binding request.  Don't do that if we can
see we specifically wanted raw-proxy.
2019-09-22 03:08:36 -07:00
Andy Green
26319663f7 license: switch LGPLv2.1+SLE parts to MIT 2019-08-14 10:44:38 +01:00
Andy Green
0ada40ce92 abstract: allow completely generic instantiation and destruction 2019-06-26 14:33:34 +01:00
Andy Green
d0b63a8df1 abstract: raw protocol name is raw-skt
not raw_skt
2019-05-12 15:49:01 +01:00
Andy Green
f89aa401cc generic-sessions update
Generic sessions has been overdue some love to align it with
the progress in the rest of lws.

1) Strict Content Security Policy
2) http2 compatibility
3) fixes and additions for use in a separate process via unix domain socket
4) work on ws and http proxying in lws
5) add minimal example
2019-05-06 10:24:51 +01:00
Andy Green
8d473ad78c smtp: make abstract 2019-05-04 08:28:31 +01:00
Andy Green
f7149e90c2 cc0: align dedication to CC0 FAQ recommended format
https://libwebsockets.org/pipermail/libwebsockets/2019-April/007937.html

thanks to Bruce Perens for noting it.

This doesn't change the intention or status of the CC0 files, they were
pure CC0 before (ie, public domain) and they are pure CC0 now.  It just
gets rid of the (C) part at the top of the dedication which may be read
to be a bit contradictory since the purpose is to make it public domain.
2019-05-02 09:29:01 +01:00
Andy Green
588cf0b8db lws_spa: add CLOSE callback
This should ease the situation where there was creation done in the
callback for LWS_UFS_OPEN
2019-03-22 16:55:51 +08:00
Andy Green
58ff44297c server-status: show correct statm value 2019-03-18 06:54:38 +08:00
Andy Green
4c3146c27c glibc: if malloc_trim() exists, call it periodically 2019-03-16 08:10:47 +08:00
Andy Green
f8cd973f85 mingw: windows: make minimal examples build 2019-03-10 08:02:02 +08:00
Andy Green
529b59cf6f xenial: fix missing stdio.h errors in minimal examples 2019-03-10 08:02:02 +08:00
Andy Green
fb90b04e97 server-status: add proc statm and switch to vhost protocol timer 2019-03-10 08:02:02 +08:00
Andy Green
93d23efc2c raw-proxy: avoid one char read too far with tokenizer 2019-03-10 08:02:02 +08:00
Andy Green
d41e0f8f7c sshd: explicitly transfer free responsibility when adopting last_alloc 2019-03-10 08:02:02 +08:00
Andy Green
2d086db6e8 codacy: fixes for warnings 2019-03-10 08:02:02 +08:00
Andy Green
bedc358dde deaddrop: extend timeout as data comes in 2019-01-24 10:59:47 +08:00
Andy Green
21889b53f7 ecdh-es
Mainly JWE support for ecdh-es and initial refactor to support multiple
recipients / signatures.
2018-12-27 06:45:32 +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
47e14ba34b genrsa: add OAEP and PSS and convert openssl to EVP
Wanting PSS padding on signatures triggers and avalanche of
openssl EVP conversions as the only way to do it with the
openssl public apis.
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
440dacc992 JOSE: refactor and prepare for JWE
Until now the JOSE pieces only had enough support for ACME.
This patch improves the JWK parsing to prepare for more
complete support and for adding JWE, genaes and genec in
later patches.
2018-12-27 06:45:31 +08:00
Andy Green
08b5ad9299 role: raw-proxy 2018-12-01 11:05:59 +08:00
Andy Green
b318877cd9 adopt: allow associated accepted vhost connections to specific role
Normalize the vhost options around optionally handling noncompliant
traffic at the listening socket for both non-tls and tls cases.

By default everything is as before.

However it's now possible to tell the vhost to allow noncompliant
connects to fall back to a specific role and protocol, both set
by name in the vhost creation info struct.

The original vhost flags allowing http redirect to https and
direct http serving from https server (which is a security
downgrade if enabled) are cleaned up and tested.

A minimal example minimal-raw-fallback-http-server is added with
switches to confirm operation of all the valid possibilities (see
the readme on that).
2018-12-01 11:05:59 +08:00
Andy Green
531ad7ee2b minimal example deaddrop 2018-12-01 11:05:59 +08:00
Andy Green
4e2eef35d4 plugin: lws deaddrop 2018-11-28 15:06:10 +08:00
Andy Green
110f1ecf46 post-demo: fix h2 flags 2018-11-28 15:06:10 +08:00
Andy Green
9bed6d6fc6 clean: general whitespace cleanup 2018-11-23 08:47:56 +08:00
Andy Green
0a0b88174d minimal: minimal-ws-client-spam 2018-11-15 10:00:54 +08:00
Andy Green
1f1314160a lws_hdr_copy: ensure enough extra space
Audit all lws_hdr_copy() usages inside lws and make sure we
take care about it failing.

Also since the patch around aggregation of headers by ',',
lws_hdr_copy() needs a little more space in the output buffer,
adjust one place where that caused it to start failing in an
exact-sized buffer.
2018-10-26 16:14:30 +08:00
Andy Green
d3bc2c3f4f fulltext search 2018-10-26 13:53:28 +08:00
pblemel
e66937a5e7 mirror: flip check on get_urlarg_by_name
https://github.com/warmcat/libwebsockets/issues/1422
2018-10-13 08:16:27 +08:00
Andy Green
33a6034875 codacy: minor fixes 2018-10-13 08:16:27 +08:00
Andy Green
35473ca446 csp: update lwsgs 2018-09-11 18:27:59 +08:00
Andy Green
f6a3aa01c9 http: enlarge headers buffers since they may meet large headers from vhost config 2018-09-11 18:27:59 +08:00
Andy Green
97f3e66f3c test-app: upgrade test.html to have separate css and js for CSP 2018-09-11 18:27:59 +08:00
Andy Green
d1f9f0ae2d libwebsockets.h: split out into a dir of sub-includes included by libwebsockets.h
This has no effect on user code or backward compatibility.

It moves the in-tree public api header libwebsockets.h from ./lib
to ./include, and introduces a dir ./include/libwebsockets/

The single public api header is split out into 31 sub-headers
in ./include/libwebsockets.  ./include/libwebsockets.h contains
some core types and platform adaptation code, but the rest of it
is now 31 #include <libwebsockets/...>

At install time, /usr/[local/]include/libwebsockets.h is installed
as before, along now with the 31 sub-headers in ...include/libwebsockets/

There's no net effect on user code.

But the api header is now much easier to maintain and study, with 31
topic-based sub headers.
2018-09-11 18:27:59 +08:00
Andy Green
d461f46a97 libwebsockets.h: clean out some boilerplate better put in core/private.h
https://github.com/warmcat/libwebsockets/issues/1370
2018-08-16 19:10:32 +08:00
Andy Green
a03dd40e62 plugins: gitws libjsongit2 support
This adds a plugin that interfaces to libjsongit2

https://warmcat.com/git/libjsongit2

to provide a per-vhost service for presenting bare git repos in a
web interface.
2018-08-14 08:00:25 +08:00
Andy Green
f2f96857d6 fd_cloexec: add and use lws_open wrapper and lws_plat_apply_FD_CLOEXEC() on cgi 2018-06-23 12:56:21 +08:00
Andy Green
db6976992d sshd: make sure no aliases on last_alloc 2018-06-07 09:41:36 +08:00
Andy Green
c4f4b5c3c4 sshd: fix timingsafe_bcmp
https://github.com/warmcat/libwebsockets/issues/1288
2018-05-23 17:24:42 +08:00
Andy Green
95c0e8bf15 post-demo: defer even header writes to writable callback 2018-05-22 11:14:10 +08:00
jas39
d48be760c0 Update protocol_esp32_lws_scan.c
Consistent use of make constant throughout files
#define CONFIG_LWS_IS_FACTORY_APPLICATION==1
2018-05-05 10:29:00 +08:00
jas39
57f7f54555 Update protocol_esp32_lws_ota.c
Corrected partition range check
Use of library constant
2018-05-05 10:17:59 +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