Add in new function coap_async_trigger() to immediately release an async
session, rather than using coap_async_set_delay(async, 1).
Add new internal function coap_update_epoll_timer() to reduce code
duplication and use it for the async logic.
Move doing coap_io_prepare_epoll() for every epoll event to just doing it once
outside of the loop.
Update documentation.
This then allows any (D)TLS to be set up between sending off the requests and
better demonstrates how this can be done in user code.
Allocate separate data for each post/put PDU.
Hold off on starting timer for next transmission until after response has
been received from the server (handles relatively slow DTLS startup).
RFC 9200 defines the new media type application/ace+cbor for
Authentication and Authorization in Constrained Environments. The
CoAP Content-Format value for this media type is registered as value
19.
Support self-signed certificates that have expired.
Correct variable ret initialization in coap_tls_read().
Catch some additional MbedTLS SSL error codes in do_mbedtls_handshake().
- For targets having their own hardware entropy/RNG implementation
using mbedtls_hardware_poll()
- This change was made as since mbedtls-3.x, passing a RNG function
to all functions that accept a f_rng parameter is mandatory
Commit 9cb2f62a3 [1] has introduced library-internal handling of
Block1 and Block2 requests. To add the data to the response body the
function coap_add_data_large_internal() is used.
This change calls the function independent of a Block2 request unless
request is NULL. The response code is set to 500 if
coap_add_data_large_internal() failed.
Fixes Coverity-Id 1514379
[1] https://github.com/obgm/libcoap/commit/9cb2f62a3eef2e0aeb682615b785d4734b473bd4
After autogen.sh --clean, all auto-generated files need to be
re-created. Before this has happened, autoreconf complains
with
configure.ac: error: required file 'ar-lib' not found
and signals an error on exit.
This change fixes the issue by touching ar-lib to force creation of an
empty file if it does not exist. Because autoreconf is called with the
options --force --install, this file will get replaced afterwards.
The CoAP Proxy may not know how to handle a Critical option, but if it
is safe to forward it should be able to handle this.
RFRC7252 5.4.1
Critical/elective rules apply to non-proxying endpoints. A proxy
processes options based on Unsafe/Safe-to-Forward classes as defined
in Section 5.7.
If this is an incoming proxy type request special case any
critical options that are safe to forward.
Track ongoing sessions from an enabled proxy server so unknown critical
response options can be passed back to the originating requestor.
Update coap-server to handle Proxy-Scheme for proxying.
Update tests to use critical option 25 instead of 9.
The provided host for windows-latest is migrating across from
windows-2019 to windows-2022 on github. This allows things to be built on
a windows-2022 system.
Fix off-by-one error for option delta = 269.
Correct / clarify the tests in coap_insert_option() when working out extended
option delta for inserting new option.
When coap_pdu_parse() returns 0, the contents of pdu are undefined and
must not be processed. This change proceeds fuzzer tests only if parsing
succeeded.
Fixes OSS-Fuzz issue 44503 [1]
[1] https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=44503
Prevent multiple coap_new_client_session*() calls that are connecting to
the same server/port being bound to the same local ip/port.
Update logging for session creation / removal to easily differentiate between
sessions that have the same 4-tuple.
Document that coap_new_endpoint() is not required in client based code.
If coap-client '-p port' but not '-a addr' is provided, fix code so that
the port is bound to.
Only remove outstanding CON requests with token matches if there is an
ACK response.
Update the logging to differentiate between the 6 occurrences where the mid
is removed.
Make coap_add_option() invalid after calling a coap_add_data*() function.
Add in internal support for adding options to PDUs that contain data with
a replacement coap_add_option_internal() function. Call this new function
in the appropriate places in the libcoap src.
Add coap_log warnings when the application tries to build a PDU in the wrong
order and then return failure.
Update documentation re-inforcing the PDU building order.
If the server recieving a Proxy request determines that it is the final
endpoint of the request, the resource that the request was sent to
was wrong. The update to coap_get_uri_path() fixes this issue.
There is now also parameter support for the proxy definition for the
coap-server where any defined host is treated as being the final endpoint
is in:
coap-server -P ,
This allows any actual server to be the final endpoint of any proxy request
without have to define all the names or IP addresses that the coap-server is
known by. Note that if there is nothing following the , (comma), anything
before the , (comma) will never be used.
Documentation updated.
Document return value can be 0 for both being valid and returning on error.
Same is true for coap_encode_var_safe().
[Error should assert() by default]
Add new function coap_package_build() which returns "git describe --tags"
if available at library build time, else standard package version.
The value of "git describe --tags" is created at run time and passed in as
a compiler -D definition.
Update copyright end dates for updated files.