Commit Graph
2902 Commits
Author SHA1 Message Date
Jon Shallow e095d5e03a RIOT: libcoap Release 4.3.5rc1 v4.3.5-rc1 2024-06-06 15:12:08 +01:00
Jon Shallow 0392d02217 release 4.3.5rc1: Release candidate 1 for 4.3.5
LIBCOAP_VERSION and LIBCOAP_PACKAGE_BASE are unchanged until
4.3.5 is released.
2024-06-06 10:07:50 +01:00
Jon Shallow ed178be577 coap-client: Correct Usage documentation 2024-06-06 10:04:42 +01:00
Jon Shallow 0223c1a3d4 Block1: Handle large FETCH with large blocked request and Observe
Handle Observe cancellation with large blocked FETCH that needs to use
diffferent tokens when there is packet loss by checking the cache-key
if the token is not found (Q-Block1).

Let FETCH with Q-Block1 use NON now that cache-key is getting checked
if token mismatch.

Handle getting an unsolicited Observe response in the middle of
sending the FETCH blocks that ultimately will be doing the Observe
cancellation following re-assembly. (The unsolicited Observe token will
be the same token that is used to respond to the observe cancellation).
2024-06-06 09:44:15 +01:00
Jon Shallow dec13f94f1 locking: Add missing COAP_API 2024-06-05 08:33:39 +01:00
Jon Shallow 782e607879 reverse-proxy: Support for .well-known/core being passed
Move get_wkc_len() into hnd_get_wellknown_lkd() to simply document how
hnd_get_wellknown() should be done.

Revert out coap_register_print_wellknown_callback() changes as no
longer needed.
2024-06-05 07:43:37 +01:00
Mario Kicherer 7c33808271 enable application control over .well-known/core responses 2024-05-31 18:07:45 +01:00
Jon Shallow 70469f24b0 examples-code-check.c: Report on missing defined function return types 2024-05-30 14:49:42 +01:00
Jon Shallow c830c15551 proxy: Handle Uri-Host correctly when using Proxy-Scheme
Updated documentation at the same time.
2024-05-29 10:20:57 +01:00
Jon Shallow 5171694d09 LwIP: NO_SYS == 0 support 2024-05-29 10:19:31 +01:00
kkrentz b7cbb64793 coap_net: Fix preprocessor guard 2024-05-28 14:20:13 +01:00
Jon Shallow f00f13831a locking: app call-backs when coap_free_context() called
Attempt to simplify locking to prevent Coverity issues being
generated.
2024-05-28 10:01:31 +01:00
Jon Shallow 520f054b5b Coverity: Fix 1588815 and 1588818 2024-05-28 09:37:09 +01:00
Jon Shallow cb20c482b2 locking: Simplify maintenance / debugging /documentation
Update the Public API equivalent of the libcoap functions that need to be
called when locked with a name suffix of _lkd.

Move matching Public API functions out of coap_threadsafe.c to be coded
just ahead of the newly renamed _lkd function.

Properly define the _lkd function in the appropriate _internal.h file for
documentation, removing the #defines from coap_threadsafe_internal.h.

Tag all the Public API functions that have a _lkd function with COAP_API.
COAP_API can then be defined as to what should be done for that function.

Check libcoap library does not call the original Public API function when
it should be calling the _lkd function by marking the Public API not _lkd
functions as deprecated during the libcoap library build.
[Done by the new COAP_API being defined as __attribute__((deprecated)).]

Work in progress for all the functions that need to be multi-thread safe.
2024-05-24 09:09:49 +01:00
Jon Shallow 948697e4b2 locking: Simplify maintenance / debugging /documentation
Update the Public API equivalent of the libcoap functions that need to be
called when locked with a name suffix of _lkd.

Move matching Public API functions out of coap_threadsafe.c to be coded
just ahead of the newly renamed _lkd function.

Properly define the _lkd function in the appropriate _internal.h file for
documentation, removing the #defines from coap_threadsafe_internal.h.

Tag all the Public API functions that have a _lkd function with COAP_API.
COAP_API can then be defined as to what should be done for that function.

Check libcoap library does not call the original Public API function when
it should be calling the _lkd function by marking the Public API not _lkd
functions as deprecated during the libcoap library build.
[Done by the new COAP_API being defined as __attribute__((deprecated)).]

Work in progress for all the functions that need to be multi-thread safe.
2024-05-23 08:30:11 +01:00
Jon Shallow e363d0a5c4 Binary PSK: Add in support for examples coap-client and coap-server
If the PSK is defined with a leading 0x, then the hex representation
of the following bytes is converted to a binary PSK.
2024-05-23 08:29:03 +01:00
Jon Shallow 91d8fad663 locking: Simplify maintenance / debugging /documentation
Update the Public API equivalent of the libcoap functions that need to be
called when locked with a name suffix of _lkd.

Move matching Public API functions out of coap_threadsafe.c to be coded
just ahead of the newly renamed _lkd function.

Properly define the _lkd function in the appropriate _internal.h file for
documentation, removing the #defines from coap_threadsafe_internal.h.

Tag all the Public API functions that have a _lkd function with COAP_API.
COAP_API can then be defined as to what should be done for that function.

Check libcoap library does not call the original Public API function when
it should be calling the _lkd function by marking the Public API not _lkd
functions as deprecated during the libcoap library build.
[Done by the new COAP_API being defined as __attribute__((deprecated)).]

Work in progress for all the functions that need to be multi-thread safe.
2024-05-22 11:40:44 +01:00
Jon Shallow e8e44bf6aa esp-idf: Support multi-threading 2024-05-22 10:09:52 +01:00
Krzysztof Gongolewski 180e8220d4 fix lwip memory leak 2024-05-22 10:09:30 +01:00
Jon Shallow d2d4a81374 locking: Simplify maintenance / debugging /documentation
Update the Public API equivalent of the libcoap functions that need to be
called when locked with a name suffix of _lkd.

Move matching Public API functions out of coap_threadsafe.c to be coded
just ahead of the newly renamed _lkd function.

Properly define the _lkd function in the appropriate _internal.h file for
documentation, removing the #defines from coap_threadsafe_internal.h.

Tag all the Public API functions that have a _lkd function with COAP_API.
COAP_API can then be defined as to what should be done for that function.

Check libcoap library does not call the original Public API function when
it should be calling the _lkd function by marking the Public API not _lkd
functions as deprecated during the libcoap library build.
[Done by the new COAP_API being defined as __attribute__((deprecated)).]

Work in progress for all the functions that need to be multi-thread safe.
2024-05-21 14:51:51 +01:00
Jon Shallow 6e68baa0f7 coap_update_token: Make sure corrected PDU headers are presented to the app 2024-05-21 09:34:11 +01:00
Jon Shallow cbfb491b1d coap_libcoap_build.h: Add in specific library build header
Gives the ability to add in additional library build checks through
the use of #define etc. that is not available to applications or
other host o/s support.

Preparatory work for further locking checks.
2024-05-20 15:39:40 +01:00
Jon Shallow 485a7c4570 check-missing-updates.sh: Clarify what needs to be done when there is an issue 2024-05-20 15:31:03 +01:00
Jon Shallow c4d0a42f97 doc: Refer to DTLS1.3 and request non-standard TLS library configurations 2024-05-18 13:39:48 +01:00
Jon Shallow 628fc3673f locking: After coap_free_context(), handle API calls from call-backs 2024-05-18 13:28:25 +01:00
Jon Shallow fb6b09ee31 coap_wolfssl.c: Fix PKI for different wolfSSL build options 2024-05-18 13:14:17 +01:00
Jon Shallow c029eedca1 nits: Tidy up documentation 2024-05-18 10:54:13 +01:00
Jon Shallow d58bd90238 checks: Check for missing file updates 2024-05-17 15:33:44 +01:00
kkrentz 280b723a73 Contiki-NG: Fix compilation error "implicit declaration of strncasecmp" 2024-05-17 11:47:12 +01:00
fj-blanco 3c72266d81 Fix to cmake build for wolfssl dtls backend
The change to cmake_coap_config.h.in solves the
following issue: when building with cmake the
functions at coap_notls.c were being compiled.

Apply fix to CMakeLists.txt.in for wolfSSL DTLS backend
2024-05-17 10:08:09 +01:00
Jon Shallow ecb588e2c3 coap_wolfssl.c: Fix DTLS MTU support 2024-05-16 12:18:50 +01:00
Jon Shallow 15bf66c920 pre-commit: Add more trailing spaces and empty line at end of file checks 2024-05-15 16:04:08 +01:00
Jon Shallow 622050a957 locking: Simplify maintenance / debugging /documentation
Update libcoap functions that need to be called locked with a name
suffix of _locked.

Move matching functions out of coap_threadsafe.c to be coded just ahead
of the newly renamed _locked function.

Properly define the _locked function in the appropriate _internal.h file
for documentation, removing the #defines from coap_threadsafe_internal.h.

Work in progress for all the functions.

Remove coap_lock_* requirements for testdriver (coap_delete_node()).
2024-05-15 15:50:14 +01:00
Mario Kicherer 6673be3b43 coap_net: add coap_context_set/get_app_data and deprecate coap_set/get_app_data 2024-05-15 15:42:45 +01:00
Jon Shallow 706201539b tinydtls: Update to latest version 2024-05-14 09:40:07 +01:00
Jon Shallow 41ed5aa787 Nits: Tidy up code
Add documentation for coap_get_resource_from_uri_path().

Remove duplicate coap_get_resource_from_uri_path() definition.

Better fix for scan-build issue.

Update RIOT libcoap base version.
2024-05-14 09:31:48 +01:00
Patryk Jarosz 5234f41c2d Fixed missing event for server session removal 2024-05-14 09:14:59 +01:00
Harshit Malpani c17f582dc9 Fix build failures with mbedtls 3.6.0 2024-05-14 09:08:34 +01:00
Jon Shallow 8e05e18511 coap_session.c: Invoke NACK handler in coap_session_disconnected()
Do this for all cases, not just for ICMP issue.
2024-05-14 09:00:54 +01:00
Jon Shallow b4a011a0e9 coap_uri.c: Fix support for app doing CoAP <> HTTP mapping 2024-05-14 08:55:59 +01:00
Jon Shallow e521eab58b coap_openssl.c: Revert out using SSL_use_certificate_chain_file()
Go back to using SSL_use_certificate_file().
Unexpected side effects with CA validation which needs further
troubleshooting to get to root cause.
2024-05-13 08:55:48 +01:00
Jon Shallow 5d77688f2d coap_block.c: Support 16 bit size_t in coap_context_set_max_block_size()
Allows RIOT to compile with 16 bit size_t processors.
2024-05-09 21:02:54 +01:00
Jon Shallow b14521d555 oscore_cbor.c: Fix bad scan-build fix 2024-05-09 21:01:23 +01:00
Jon Shallow e599e25d6e oss-fuzz: Fix issue in coap_pdu_parse_opt() 2024-05-09 13:33:06 +01:00
Jon Shallow dae064c7e8 scan-build: Add scan-build into the workflow testing 2024-05-09 10:57:16 +01:00
Jon Shallow 4a94cc7c80 scan-build: Fix warnings 2024-05-09 10:57:16 +01:00
Jon Shallow d5a0d9c116 PKI: Add in coap_pki_key_define_t support to remaining TLS interfaces 2024-05-09 10:14:33 +01:00
Jon Shallow cec964e0b0 locking: Unlock context when calling request/response handlers
This is to reduce contention on the context lock when a request/response
handler takes time to get / update information.
2024-05-09 10:04:31 +01:00
Jon Shallow cd88fad218 coap_net.c: Silently drop incorrect CoAP version packets
As per https://datatracker.ietf.org/doc/html/rfc7252#section-3

Implementations of this specification MUST set this field to 1
(01 binary). Other values are reserved for future versions. Messages
with unknown version numbers MUST be silently ignored.
2024-05-09 09:58:40 +01:00
Jon Shallow 62a4934b6d coap_block.c: Use /.well-known/core when testing for Q-Block Support
It is possible the server does not support / resource, but does
support Q-Block - and responds with a 4.04, so Q-Block support
cannot be detected.
2024-05-06 10:50:30 +01:00