summaryrefslogtreecommitdiff
path: root/tests/tls.c
Commit message (Collapse)AuthorAge
* 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.)
* don't use deprecated functions in tests (#1560)Edward Rudd2021-12-29
|
* fixes #1478 mbedTLS 3.0 is not API compatible with 2.xGarrett D'Amore2021-08-09
|
* fixes #1401 valgrind reports leaks in all testsGarrett D'Amore2021-01-03
| | | | | | | This arranges for nng_fini to be called via atexit in the test version of the library. It also cleans up some of the actual tests to reduce extraneous (and in some cases incorrect) calls to nng_fini.
* fixes #1005 TLS 1.3 supportGarrett D'Amore2020-02-23
| | | | | | | | This introduces support for an external wolfSSL plugin, and generally creates the framework for pluggable TLS implementations. The wolfSSL engine is provided via an external module (git submodule), available either under a GPLv3 license or a commercial license.
* fixes #831 Unify option structures, o_type is unusedGarrett D'Amore2018-12-29
|
* move all public headers to include/nng/ folderGregor Burger2018-11-22
| | | | | | | | | | This change makes embedding nng + nggpp (or other projects depending on nng) in cmake easier. The header files are moved to a separate include directory. This also makes installation of the headers easier, and allows clearer identification of private vs public heade files. Some additional cleanups were performed by @gedamore, but the main credit for this change belongs with @gregorburger.
* fixes #678 local binding for TLS+TCP socketsGarrett D'Amore2018-08-28
|
* Issues/634 (#677)Matthew Zipay2018-08-28
| | | | * fixes #634 for tests/tls by explicitly using IPv4 for the "Valid verify works" test
* fixes #644 remove start from TLS codeGarrett D'Amore2018-08-14
|
* Revert "fixes #599 nng_dial sync should not return until added to socket"Garrett D'Amore2018-08-06
| | | | | This changeset needs work. We are seeing errors described by This reverts commit d7f7c896c0ede24249ef63b1e45b1878bf4bd473.
* fixes #599 nng_dial sync should not return until added to socketGarrett D'Amore2018-08-05
| | | | | | | | | | fixes #208 pipe start should occur before connect / accept fixes #616 Race condition closing between header & body This refactors the transports to handle their own connection handshaking before passing the pipe to the socket. This changes and simplifies the setup. This also fixes a rather challenging race condition described by #616.
* fixes #469 SO_REUSEADDR should be enabledGarrett D'Amore2018-05-21
| | | | | | | | | | | | | | | | | | | fixes #468 TCP nodelay and keepalive should start usable fixes #467 NN_RCVMAXSZ option does not work (compat) fixes #465 Support NN_OPT_TCPNODELAY (compat) This is a rather larger change set than I'd like, but when adding support for legacy TCP keepalive, I found a number if issues using the legacy TCP test (which we are introducing with this commit.) This fixes the concerns that are relevant and addressible. We have elected not to try to support to local address binding at this time, and the IPv6 test case in the old code was wrong, so changes relevant to that are commented out. I've also updated the nng_compat manual page to reflect additional caveats that folks should be aware of, including the previously undocumented caveat around the NN_SNDBUF and NN_RCVBUF options.
* fixes #381 Want comparators for various typesGarrett D'Amore2018-05-01
|
* fixes #375 integer types are error proneGarrett D'Amore2018-04-26
| | | | | | | | | | | | | | This change converts the various integer types like nng_socket in the public API to opaque structures that are passed by value. Basically we just wrap the integer ID. This "hack" give us strong type checks by the compiler (yay!), at the expense of not being able to directly use these as numbers (so comparisions for example don't work, and neither does initialization to zero using the normal method. Comparison of disassembly output shows that at least with the optimizer enabled there is no difference in the compiler output between using a structure or an integral value.
* fixes #105 Want NNG_OPT_TCP_NODELAY optionGarrett D'Amore2018-04-26
| | | | fixes #106 TCP keepalive tuning
* fixes #301 String option handling for getoptGarrett D'Amore2018-03-20
|
* fixes #296 Typed options should validate option typeGarrett D'Amore2018-03-20
| | | | | | | | | | | | | fixes #302 nng_dialer/listener/pipe_getopt_sockaddr desired This adds plumbing to pass and check the type of options all the way through. NNG_ZT_OPT_ORBIT is type UINT64, but you can use the untyped form to pass two of them if needed. No typed access for retrieving strings yet. I think this should allocate a pointer and copy that out, but that's for later.
* fixes #289 nng_sockaddr could just be a unionGarrett D'Amore2018-03-14
| | | | fixes #290 sockaddr improvements
* fixes #262 NNG_OPT_URL should be resolvedGarrett D'Amore2018-03-04
| | | | | | | | This causes TCP, TLS, and ZT endpoints to resolve any wildcards, and even IP addresses, when reporting the listen URL. The dialer URL is reported unresolved. Test cases for this are added as well, and nngcat actually reports this if --verbose is supplied.
* Isolate TLS functions into separate tls.h header file.Garrett D'Amore2018-03-02
|
* fixes #234 Investigate enabling more verbose compiler warningsGarrett D'Amore2018-02-14
| | | | | | | We enabled verbose compiler warnings, and found a lot of issues. Some of these were even real bugs. As a bonus, we actually save some initialization steps in the compat layer, and avoid passing some variables we don't need.
* fixes #219 transports should take URL structure instead of string addressGarrett D'Amore2018-01-22
| | | | | | | | | | This eliminates a bunch of redundant URL parsing, using the common URL logic we already have in place. While here I fixed a problem with the TLS and WSS test suites that was failing on older Ubuntu -- apparently older versions of mbedTLS were unhappy if selecting OPTIONAL verification without a validate certificate chain.
* fixes #209 NNG_OPT_TLS_VERIFIED is bustedGarrett D'Amore2018-01-17
| | | | | fixes #210 Want NNG_OPT_TLS_* options for TLS transport fixes #212 Eliminate a_endpt member of aio
* fixes #186 Suggested API changes for nng TLS certsGarrett D'Amore2018-01-09
|
* Fix some more leaks, add a generic URL parser.Garrett D'Amore2018-01-05
|
* Rename config init/fini to alloc/free, add documentation for them.Garrett D'Amore2017-12-31
|
* fixes #166 Websocket TLS mappingGarrett D'Amore2017-12-30
| | | | | | | | | | | | | | | | | This introduces the wss:// scheme, which is available and works like the ws:// scheme if TLS is enabled in the library. The library modularization is refactored somewhat, to make it easier to use. There is now a single NNG_ENABLE_TLS that enables TLS support under the hood. This also adds a new option for the TLS transport, NNG_OPT_TLS_CONFIG (and a similar one for WSS, NNG_OPT_TLS_WSS_CONFIG) that offer access to the underlying TLS configuration object, which now has a public API to go with it as well. Note that it is also possible to use pure HTTPS using the *private* API, which will be exposed in a public form soon.
* fixes #2 Websocket transportGarrett D'Amore2017-12-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a rather large changeset -- it fundamentally adds websocket transport, but as part of this changeset we added a generic framework for both HTTP and websocket. We also made some supporting changes to the core, such as changing the way timeouts work for AIOs and adding additional state keeping for AIOs, and adding a common framework for deferred finalization (to avoid certain kinds of circular deadlocks during resource cleanup). We also invented a new initialization framework so that we can avoid wiring in knowledge about them into the master initialization framework. The HTTP framework is not yet complete, but it is good enough for simple static serving and building additional services on top of -- including websocket. We expect both websocket and HTTP support to evolve considerably, and so these are not part of the public API yet. Property support for the websocket transport (in particular address properties) is still missing, as is support for TLS. The websocket transport here is a bit more robust than the original nanomsg implementation, as it supports multiple sockets listening at the same port sharing the same HTTP server instance, discriminating between them based on URI (and possibly the virtual host). Websocket is enabled by default at present, and work to conditionalize HTTP and websocket further (to minimize bloat) is still pending.
* fixes #160 Convert TLS url from tls:// to tls+tcp://Garrett D'Amore2017-11-27
|
* fixes #3 TLS transportGarrett D'Amore2017-11-20
This introduces a new transport (compatible with the TLS transport from mangos), using TLS v1.2. To use the new transport, you must have the mbed TLS library available on your system (Xenial libmbedtls-dev). You can use version 2.x or newer -- 1.3.x and PolarSSL versions are not supported. You enable the TLS transport with -DNNG_TRANSPORT_TLS=ON in the CMake configuration. You must configure the server certificate by default, and this can only be done using nng options. See the nng_tls man page for details. This work is experimental, and was made possible by Capitar IT Group BV, and Staysail Systems, Inc.