| Commit message (Collapse) | Author | Age |
| |
|
| |
This is a bug I found in the past 2 days. Easily reproduce with low number of taskq_threads and set small timeout duration to http connect aio.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Because it is typically associated with insecure code, use of sprintf
is discouraged. Note that our usage was actually quite careful and
not insecure, but its mere presence raises concern especially by parties
who are unwilling or unable to assess the actual code for correctness.
A better choice here would be strlcat, but strlcat is not universally
available.
(cherry picked from commit d0d48cad89532c56742d85e898f749e587fe32b7)
|
| |
|
|
|
| |
This requires using a supporting version of Mbed TLS.
We have to use PSA crypto for TLS 1.3.
|
| |
|
|
|
|
| |
This allows an efficient way to iterate over the entries
stored in an ID hash. The iteration is fast, and requires no
additional storage. The order of iteration is not guaranteed.
|
| |
|
|
| |
as NNG and add PSK
|
| |
|
|
| |
This is in preparation for the wolfSSL integration.
|
| |
|
|
|
| |
Also, while here, prepare for PSK support to be conditional -- it is not
necessarily on by default in all future engines (e.g. WolfSSL.)
|
| | |
|
| |
|
|
|
|
| |
This also adds an SP layer transport test for TLS, based on the TCP
test but with some additions; this test does not cover all the edge
cases for TLS, but it does at least show how to use it.
|
| |
|
|
| |
This also deprecates supplemental/util/platform.h.
|
| | |
|
| |
|
|
|
| |
This isn't complete, but it should go much further in assisting
debugging TLS related errors.
|
| |
|
|
|
|
|
|
|
|
|
| |
Add the missing stub function implementation for `nng_tls_config_hold`.
Fixes an error when loading the library and expecting to have this
symbol available.
The availability of the symbol can be checked with nm:
```
nm -D cmake-build-release/libnng.so.1.7.3 | grep nng_tls_config_hold
```
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
Try to use the Mbed TLS cmake configuration data if present, and
refactor our FindModule to adhere to the same basic API.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
We accidentally made idhash not public by not publishing its header
in the right place. This is really generic utility stuff, so we
have posted it in the nng/supplemental/util/ directory.
We've also removed the ability to remove this -- its a very small amount
of additional code, as its just a wrapper on top of mandatory functionality.
|
| |
|
|
|
|
|
|
|
| |
This includes a manual page documenting the entire set of
functions in one step. The hash is 64-bit based for now, to
be maximally flexible. An internal 32-bit convenience for the
common internal use is also provided (not public).
The public API includes a test suite.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This transport only listens, and creates connections when
the application calls setopt on the lister with NNG_OPT_SOCKET_FD,
to pass a file descriptor. The FD is turned into an nng_stream,
and utilized for SP. The protocol over the descriptor is identical
to the TCP protocol (not the IPC protocol).
The options for peer information are borrowed from the IPC transport,
as they may be useful for these purposes.
This includes a test suite and full documentation.
|
| |
|
|
|
|
| |
It's not absolutely clear that this fixes all of the possible
cases, but we're hopeful that this does -- and in any event the
bug does not seem to reproduce easily anymore.
|
| |
|
|
| |
fixes #1733 deadlock in websocket listener close
|
| |
|
|
|
|
| |
The aio for connections was meant to have an infinite sleep (no
timeout), but was getting an initial value of zero, so we were spinning
on accept.
|
| | |
|
| | |
|
| |
|
| |
Co-authored-by: Christian Fischbach <cfischbach@mac.com>
|
| |
|
|
| |
Signed-off-by: Andrey Vostrikov <andrey.vostrikov@cogentembedded.com>
Co-authored-by: Andrey Vostrikov <andrey.vostrikov@cogentembedded.com>
|
| |
|
|
|
|
|
| |
None of these changes are actual security bugs, but GitHub's
scanner reports false positives at Critical severity for them.
(There are a number of complaints from that scanner, many of
which we do not necessarily agree with.)
|
| | |
|
| |
|
|
|
|
| |
This takes one less parameter, and is simpler. It will let us
reclaim the aio_prov_extra data space as well, so that we can
use it for other purposes.
|
| |
|
|
|
|
| |
This eliminates some run-time initialization, moving it to compile time.
Additional follow up work will expand on this to simplify initialization
and reduce the need for certain locks.
|
| |
|
|
|
| |
This is initially used for TLS to make loading the engine pointer
faster, eliminating a much more expensive lock operation.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
The comment is an artifact from an old tls_reap function and no longer
describes the following function (conn_init).
Function conn_init should be marked static.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
This is not quite complete, but it sets the stage for other
protocols (such as zmq or mqtt) to be added to the project.
|
| | |
|
| | |
|
| |
|
|
| |
This was only used internally, and can live as part of core.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This is based on testutil/acutest, but is cleaner and fixes some
short-comings. We will be adding more support for additional
common paradigms to better facilitate transport tests.
While here we added some more test cases, and fixed a possible
symbol collision in the the stats framework (due to Linux use
of a macro definition of "si_value" in a standard OS header).
Test coverage may regress slightly as we are no longer using
some of the legacy APIs.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are a few major areas in this change.
* CMake options are now located in a common cmake/NNGOptions.cmake
file. This should make it easier for folks to figure out what
the options are, and how they are used.
* Tests are now scoped with their directory name, which should
avoid possible name collisions with test names.
* A number of tests have been either moved or incorporated into
the newer testutil/acutest framework. We are moving away from
my old c-convey framework to something easier to debug.
* We use CMake directories a bit more extensively leading to a much
cleaner CMake structure. It's not complete, but a big step in the
right direction, and a preview of future work.
* Tests are now run with verbose flags, so we get more test results
in the CI/CD logs.
|