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.
Two new functions added
coap_tls_engine_configure()
coap_tls_engine_remove()
Added in new PKI key type coap_pki_key_define_t which allows the CA, Public Cert
and Private Key to be different types (e.g. PEM, DER etc.).
Added a new key type ENGINE to make use of the configured tls_engine.
Added in a -q option to coap-server and coap-client for testing ENGINE.
Note: ENGINE is only supported by OpenSSL.
Add in new COAP_BLOCK_NOT_RANDOM_BLOCK1 option for
coap_context_set_block_mode(). This disables receipt of any Block1
packet (but not Q-BLock1) if the block numbers are not sequentially
received starting with 0. A 4.08 code is returned for every packet
out of order and its data is ignored.
If COAP_BLOCK_SINGLE_BODY is set in coap_context_set_block_mode(),
but not COAP_BLOCK_NOT_RANDOM_BLOCK1, then all Block1 packets are
assembled in the correct order before passing the body up to the
application. The receive logic will timeout after MAX_TRANSMIT_WAIT
(93 seconds) if there are any missing blocks, or 10 seconds if the
last block is seen.
If COAP_BLOCK_SINGLE_BODY is not set in coap_context_set_block_mode(),
and not COAP_BLOCK_NOT_RANDOM_BLOCK1, then the random order packets
are passed up to the application layer where it is the application's
responsibility to decide what to do with the randomly ordered packets,
and what response code to send.
This fixes a reported error in coap_update_token() where a size_t
calculation is overflowed (but all ends up with the correct value).
Instead of adding an overflowed size_t, now subtract the reversed
size_t calculation as appropriate.
coap_update_option() and coap_insert_option() similarily updated.
Create a CMakeLists.txt.in copy of CMakeLists.txt containing LIBCOAP_*
skeletons where appropriate. When ./configure is run, CMakeLists.txt then
gets updated with the latest versioning ready for distribution and using.
CMake unfortunately does not handle, for example, 4.3.5rc1 (the rc1 suffix)
for the "project (libcoap VERSION xxx)", so this has to end up as 4.3.5
in CMakeLists.txt.
For the test suite, treat these tests as using the public API so locking
is handled by the underlying libcoap.
The only exception is for coap_delete_node() which is an internal function
and expects context to be locked on entry.
Fix generated response PDU in handle_request() to be of type CON
if reliable protocol (as a lot of code assumes it to be of pseudo
type CON) to stop a warning in coap_show_pdu().
Update session->addr_info from packet->addr_info before logging incoming
packet. Only seen on the first incoming packet for a client as subsequent
packets likely to be the same address..
Revert out change from #1276 and decrement token in coap_session_init_token() to
make sure starting token used is the same as that provided to
coap_session_init_token().
As done for GnuTLS and MbedTLS, add compile time support for changing
the DTLS retry timoouts.
$ ./configure CFLAGS=-DCOAP_DTLS_RETRANSMIT_MS=3000
to make it 3000 ms instead of the default of 1000ms.