| Commit message (Collapse) | Author | Age |
| | |
|
| | |
|
| | |
|
| |
|
|
| |
This may resolve a surprising NULL pointer dereference.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
This saves some atomic lookups, and avoids possible races when the
engine is not yet initialized or being torn down.
|
| |
|
|
|
| |
We never use or test this code, and its better to not have it if
nobody is using it.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This work is inspired by the DTLS work, and harmonizes the UDP implementation
with DTLS somewhat.
This should make it more resilient to failures, although there is no longer any
attempt to guard against sequencing (reorders, dupes) errors. Applications that
need such protection should either add it themselves, or use a transport which
provides that guarantee (such as TCP). Note that with devices and and such in
the way, such guarantees have never been perfect with SP anyway.
The UDP transport header sizes for this are now just 8 bytes (beyond the UDP header
itself.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
An explicit call to `mbedtls_ssl_set_hostname(NULL)` is now required if the hostname should not be verified in handshake. From the mbedtls changelog:
```
= Mbed TLS 3.6.3 branch released 2025-03-24
Default behavior changes
* In TLS clients, if mbedtls_ssl_set_hostname() has not been called,
mbedtls_ssl_handshake() now fails with MBEDTLS_ERR_SSL_CERTIFICATE_VERIFICATION_WITHOUT_HOSTNAME if certificate-based authentication of the server is attempted.
This is because authenticating a server without knowing what name
to expect is usually insecure. To restore the old behavior, either
call mbedtls_ssl_set_hostname() with NULL as the hostname, or
enable the new compile-time option MBEDTLS_SSL_CLI_ALLOW_WEAK_CERTIFICATE_VERIFICATION_WITHOUT_HOSTNAME.
```
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This introduces a new experimental transport for DTLS, that
provides encryption over UDP. It has a simpler protocol than
the current UDP SP protocol (but we intend to fix that by making
the UDP transport simpler in a follow up!)
There are a few other fixes in the TLS layer itself, and in
the build, that were needed to accomplish this work.
Also there was an endianness bug in the UDP protocol handling, which
is fixed here.
|
| |
|
|
|
| |
These are intended for new transports. Right now they are not
documented, but that will be addressed soon.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
This is part of our work to improve type safety/awareness, and also
improve debugger support, for NNG error codes. There are still quite
a few more but this should help.
|
| |
|
|
|
|
|
| |
transport tests
This has been needed for some time; the convey framework is not reliable or debuggable,
and will ultimately be removed. Only the http client test remains using it.
|
| |
|
|
| |
This replaces the convey style test.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
This allows us to break the assumption that the bottom half is
TCP, or even an nng_stream, since the DTLS layer will use a totally
different layer. Only nng_stream neeeds to support dial and listen.
Also: UDP: Make the sockaddr arguments to open const.
Also: Align the IPv6 address in the sockaddr (this allows for
efficient 64-bit or even 128-bit operations on these values.)
|
| |
|
|
| |
UBSAN warning
|
| |
|
|
|
|
| |
This allow to pass constrant string i particular and constant data in general
to nng functions.
Co-authored-by: Garrett D'Amore <garrett@damore.org>
|
| |
|
| |
basically when aio timeout before the connaio of dialer, and users try to free the http_client obj will end in infinite blocking at nni_http_client_fini. Possibly at nni_aio_free(c->aio); or nng_stream_dialer_free(c->dialer); Both racing case is due to the ingnored aio aborting here. Because the aio_begin is called before it is put into the nni_list. I assume you shall abort it no matter if it is in the dialing list.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
executing in tcp_cb
the reason of the modification refers to https://github.com/nanomsg/nng/issues/2100
Signed-off-by: wangchen <wangchen41@xiaomi.com>
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
This is slightly less efficient, but it provides for better debugging
and type safety.
|