summaryrefslogtreecommitdiff
path: root/src/supplemental
Commit message (Collapse)AuthorAge
* * FIX [HTTP] fix a blocking case when freeing http clientJaylin2025-04-27
| | | 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.
* http server: sprintf is considered deprecatedGarrett D'Amore2025-03-16
| | | | | | | | | | | | 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)
* TLS: enable TLS 1.3 for Mbed TLS.Garrett D'Amore2024-08-14
| | | | | This requires using a supporting version of Mbed TLS. We have to use PSA crypto for TLS 1.3.
* idhash: add nng_id_visit APIGarrett D'Amore2024-08-11
| | | | | | 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.
* fixes #1849 merge wolfSSL support inline, and relicense it under same terms ↵Garrett D'Amore2024-07-22
| | | | as NNG and add PSK
* TLS: make some tests conditional.Garrett D'Amore2024-07-22
| | | | This is in preparation for the wolfSSL integration.
* TLS: Stop making the licensing message a warning - notice is sufficient.Garrett D'Amore2024-07-22
| | | | | Also, while here, prepare for PSK support to be conditional -- it is not necessarily on by default in all future engines (e.g. WolfSSL.)
* TLS: announce which engine we are using (in anticipation of newer TLS engines)Garrett D'Amore2024-07-22
|
* fixes #1846 Add support for TLS PSKGarrett D'Amore2024-07-21
| | | | | | 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.
* Move the rest of the functionality from platform.h into core.Garrett D'Amore2024-04-23
| | | | This also deprecates supplemental/util/platform.h.
* [tls_common] finish conn lock in tls_reapMoi Ran2024-04-14
|
* fixes #1588 TLS should log errorsGarrett D'Amore2024-04-14
| | | | | This isn't complete, but it should go much further in assisting debugging TLS related errors.
* Add missing `nng_tls_config_hold` stub functionMarc Lasch2024-04-13
| | | | | | | | | | | 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 ```
* fixes #1771 cmake: respect CMAKE_FIND_PACKAGE_PREFER_CONFIG if presentGarrett D'Amore2024-02-28
|
* fix typo in test for CMAKE_FIND_PACKAGE_PREFER_CONFIGGarrett D'Amore2024-02-17
|
* base64_test: fix compiler warning about castGarrett D'Amore2024-01-27
|
* tls: fix cast to integer warningGarrett D'Amore2024-01-27
|
* Mbed TLS CMake improvements.Garrett D'Amore2024-01-27
| | | | | Try to use the Mbed TLS cmake configuration data if present, and refactor our FindModule to adhere to the same basic API.
* Fix warning from inconsistent socket_pair prototype.Garrett D'Amore2024-01-06
|
* fix idhash not publicGarrett D'Amore2024-01-06
| | | | | | | | | 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.
* fixes #1740 Public ID hash APIGarrett D'Amore2023-12-29
| | | | | | | | | 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.
* fixes #1746 Create a new socket:// transport for socketpair() based connectionsGarrett D'Amore2023-12-29
| | | | | | | | | | | | | 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.
* fixes #1734 websocket dialer hang on shutdownGarrett D'Amore2023-12-17
| | | | | | 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 #1735 websocket should send, and wait for, WS_CLOSE frames on shutdownGarrett D'Amore2023-12-17
| | | | fixes #1733 deadlock in websocket listener close
* fixes #1673 High CPU usage with TLSGarrett D'Amore2023-12-16
| | | | | | 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.
* Skip URI parameters when serving a directory (http_server)Robert Bielik2023-08-23
|
* fixes#1611 http_sconn_error() in http_server.c; use after freeGarrett D'Amore2023-04-19
|
* Get common name and subject alternative names of peer certificate (#1617)Christian Fischbach2023-02-08
| | | Co-authored-by: Christian Fischbach <cfischbach@mac.com>
* Fill NNG_PKGS to request nng dependencies from installed location. (#1641)Garrett D'Amore2023-02-05
| | | | Signed-off-by: Andrey Vostrikov <andrey.vostrikov@cogentembedded.com> Co-authored-by: Andrey Vostrikov <andrey.vostrikov@cogentembedded.com>
* Fixes for some security complaints.Garrett D'Amore2022-12-31
| | | | | | | 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.)
* Fix out-of-bounds error in http_uri_canonify(). (#1595)Manuel Saraiva2022-05-31
|
* Replace nni_aio_prov_set_extra with nni_aio_prov_set_data.Garrett D'Amore2021-12-31
| | | | | | 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.
* Use static initialization for lists and mutexes.Garrett D'Amore2021-12-05
| | | | | | 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.
* Provide atomic pointer support.Garrett D'Amore2021-12-05
| | | | | This is initially used for TLS to make loading the engine pointer faster, eliminating a much more expensive lock operation.
* fixes #1346 windows ipc winsec fails frequently in CI/CDGarrett D'Amore2021-11-02
|
* fixes #1478 mbedTLS 3.0 is not API compatible with 2.xGarrett D'Amore2021-08-09
|
* Remove extra wrapper for platform clock support.Garrett D'Amore2021-07-22
|
* fixes #1471 Use of strdup instead of nni_strdup in mbedtls/tls.cGarrett D'Amore2021-07-22
|
* remove extraneous comment, set conn_init static (#1424)Dave Voutila2021-02-17
| | | | | | 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.
* Fix typo in tls_common.c (#1412)Evgeny Ermakov2021-01-24
|
* fixes #1403 http ws listeners added without a lockGarrett D'Amore2021-01-10
|
* fixes #1393 Use after free in http (#1395)Evgeny Ermakov2021-01-03
|
* Fix compilation warnings (#1397)Evgeny Ermakov2021-01-02
|
* fixes #1345 Restructure the source treeGarrett D'Amore2021-01-01
| | | | | This is not quite complete, but it sets the stage for other protocols (such as zmq or mqtt) to be added to the project.
* fixes #1372 nni_reap could be smallerGarrett D'Amore2020-12-19
|
* fixes #1313 support deferred nng_aio destructionGarrett D'Amore2020-12-12
|
* Move TCP out of supplemental.Garrett D'Amore2020-12-05
| | | | This was only used internally, and can live as part of core.
* fixes #1358 nni_strtou64 and nni_strtox64 could be replaced with strtoullGarrett D'Amore2020-11-23
|
* New NUTS test framework (NNG Unit Test Support).Garrett D'Amore2020-11-23
| | | | | | | | | | | | | 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.
* Work for test refactoring.Garrett D'Amore2020-11-18
| | | | | | | | | | | | | | | | | | | | | | 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.