Commit Graph
2830 Commits
Author SHA1 Message Date
Jon Shallow e25cf94d2a RIOT: Update to use SOCK i/f, not Posix
Remove all references to Posix functions, using Sock functions as appropriate.

Update coap_address_t to be RIOT specific when doing RIOT builds.
2024-03-12 17:15:01 +00:00
Jon Shallow 11d8e7cd72 coap_net.c: Response PDU not set to CON if reliable protocol
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().
2024-03-11 10:21:24 +00:00
Jon Shallow db6409bb80 QNX: Add in build support
Support compiling QNX 7 SDK.
2024-03-06 12:17:35 +00:00
Jon Shallow 1039f05294 SO_VERSION: Bump LT_LIBCOAP_REVISION to match release-4.3.4-patches
This is to make the SO Version 3.1.2, to match that that of branch
release-4.3.4-patches and tag v4.3.4a.
2024-03-06 12:15:09 +00:00
Jon Shallow 25e434d883 configure.ac: Correct libtool documentation 2024-03-06 12:10:34 +00:00
Mihaela-Madalina Nuta 3e4358844d ESP32: Add platform support 2024-03-04 11:29:16 +00:00
Jon Shallow 9f499ad42f coap_netif.c: Update incoming packet addresses earlier for any logging
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..
2024-02-29 11:22:49 +00:00
Jon Shallow e253183a5e coap_session.c: Fix token generation in coap_session_new_token()
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().
2024-02-29 11:15:28 +00:00
Jon Shallow a733325b16 multithread: Re-arrange lock checks for locked callbacks
Should fix CIDs
1583518-1583525
1583527-1583549
1583551-1583553
1583555-1583562
1583565-1583584
1583586-1583589
2024-02-21 16:54:32 +00:00
Jon Shallow 7660069944 coap_openssl.c: Add in support for changing the DTLS retry timeout
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.
2024-02-20 11:20:07 +00:00
Jon Shallow 9510cf9032 coap_io.c: Further cleanup of timeout checking code
Fixes issue caused by #1314 found during testing.

Code re-worked to make more readable for flow checking.
2024-02-15 10:02:05 +00:00
Jon Shallow 852d7371b5 coap-client.c: Correct sending of SNI using localhost for PSK 2024-02-12 14:11:14 +00:00
Jon Shallow 3852554fe2 coap-server.txt.in: Correct typo 2024-02-12 14:10:09 +00:00
Jon Shallow f34d955440 coap_mbedtls.c: Enable PSA Crypto support if available 2024-02-12 14:09:15 +00:00
Jon Shallow 9603622715 coap-client.c: Enable (D)TLS1.3 support for PSK
Only set up Identity Hint checks (not available for (D)TLS1.3, and so
forces downgrade to (D)TLS1.2) if -h option is used for the coap-client.
2024-02-12 14:07:46 +00:00
Jon Shallow 5cb998b489 coap-server.c: Fix CID 1583585 2024-02-12 14:06:04 +00:00
Jon Shallow abcc291c3f coap_session.c: Fix CID 1583554 2024-02-12 14:04:22 +00:00
Jon Shallow ebc693fec0 coap-server.c: Fix CID 1583550 2024-02-12 14:03:00 +00:00
Jon Shallow 841626f64f coap_session.c: Fix CID 1583526 2024-02-12 14:01:49 +00:00
Jon Shallow bfbfd69ff5 coap_threadsafe.c: Fix CID 1566426 2024-02-12 14:00:18 +00:00
Jon Shallow 224aa74a03 coap_io.c: Cleanup timeout checking code in coap_io_process_with_fds()
Should fix CID: 1583564
2024-02-12 13:52:22 +00:00
Jon Shallow 5efe163af2 Zephyr: Initial Zephyr integration setup
zephyr/ Initial files added
2024-02-12 13:42:04 +00:00
Jon Shallow 2b28d8b0e9 coap_oscore.c: Fix parsing OSCORE configuration information 2024-01-26 12:39:18 +00:00
Denis Begun c7c3275e53 This fixes the issue of a client not ACKing a duplicate CON message from the server.
A duplicate CON message is sent by the server if the client's ACK to the original
confirmable message did not reach the server.
See issue #1306 for full description: https://github.com/obgm/libcoap/issues/1306
2024-01-06 14:51:30 +00:00
slokhorst b3ba77d66a Use grep -E instead of deprecated egrep 2024-01-06 13:23:08 +00:00
Jon Shallow 8237c1d801 Copyright: Update to 2024 2024-01-02 08:45:59 +00:00
Jon Shallow cc1cc1ad27 coap_net.c: Check for invalid PDU class codes 2023-12-27 11:31:26 +00:00
Jon Shallow e7105286f6 coap_threadsafe.c: Fix NPE in coap_delete_resource() 2023-12-20 10:54:54 +00:00
Jon Shallow c162187a6a get_config.sh: Add in script to easily get current build configuration 2023-12-19 16:41:13 +00:00
Jon Shallow a3ed4665a2 cmake_coap_config.h.in: Add missing HAVE_ definitions
HAVE_ entries sorted to aid future additions.
2023-12-13 21:12:58 +00:00
Jon Shallow b91090d093 coap_net.c: Ignore ACK with request code 2023-12-06 09:50:34 +00:00
Jon Shallow a141e442b0 coap_block.c: Handle incorrect SZX changes for Block2 2023-11-30 16:51:43 +00:00
Jon Shallow 0f3ae5022d coap_block.c: Support server setting max block size for Block1/Block2 2023-11-30 16:48:10 +00:00
Jon Shallow 8596191814 configure.ac: Align summary output 2023-11-28 16:57:50 +00:00
Jon Shallow 89d5151ffa CMakeLists.txt: Correct typos 2023-11-28 16:56:31 +00:00
Jon Shallow 31db05b7f3 Issue: Update Issue template for clarity over configuration details 2023-11-28 13:45:18 +00:00
Jon Shallow afbac63b28 block.c: Report 4.08 for missing Block1 chunks of data
Not applied to RFC9177 Q-Block1 missing blocks which are handled in
a different way.
2023-11-25 11:43:52 +00:00
Jon Shallow 9d15f7edc4 block.c: Add in additional SZX invalid checks 2023-11-25 11:42:49 +00:00
Jon Shallow c69c5d5af0 multi-thread: Add in thread safe support
Optional compile time thread safe code supported.

Locking is done at the coap_context_t level, and if enabled is primarily
done coap_threadsafe.c and coap_threadsafe_internal.h.

coap_threadsafe_internal.h causes coap_X() to get mapped to coap_X_locked()
throughout the libcoap library code with the exception of coap_threadsafe.c
if thread safe is enabled.
2023-11-25 11:41:26 +00:00
Jon Shallow 6b4fac968d PKI: Document intermediate CAs
Correct some typos
2023-11-20 11:27:58 +00:00
Jon Shallow 2e7cb35c01 WebSocket: Add support for noTLS and TinyDTLS
Use SHA1 code from RFC3174 sections 7.1 and 7.2.
2023-11-15 10:06:44 +00:00
Jon Shallow 805d148dd0 LwIP: Support TCP
If LWIP_TCP is set, then CoAP TCP support is compiled in.
2023-11-11 10:24:08 +00:00
Jon Shallow fa88e3235b OpenSSL: Support user defined PKCS11 engine id.
Supported by defining COAP_OPENSSL_PKCS11_ENGINE_ID value through complier /
configure additional parameters which gets passed into ENGINE_by_id().

E.g.

$ ./configure CPPFLAGS=-DCOAP_OPENSSL_PKCS11_ENGINE_ID='\"pkcs11\"'
2023-11-11 10:05:44 +00:00
kkrentz 3b246dfe73 OSCORE: Treat CoAP pings as requests 2023-11-07 16:18:07 +00:00
chengshq 1456d9aa0d Fix inconsistent tokens received by other servers
When use `coap-client` with -T command, the other server received inconsistent.
```
coap-client send token "aaa", the other server received "aab"
coap-client send token "obstoken", the other server received "obstokeo"
```
2023-11-07 09:26:27 +00:00
Kamil Panek ecc55544d6 coap_debug.c: reset all globals in coap_debug_reset 2023-11-03 13:32:52 +00:00
kkrentz b2c3ca3b89 coap_net.c: Reuse coap_option_filter_clear in coap_dispatch 2023-11-03 11:29:51 +00:00
kkrentz ae4c5c7ad0 OSCORE: Account for pseudo-token to prevent coap_pdu_resize 2023-11-03 11:28:55 +00:00
Jon Shallow e602adeb3b pre-commit: Update revision of astyle_py 2023-10-27 11:42:24 +01:00
Jon Shallow 50b5f29133 coap_ws.c: Combine header and data in output from coap_ws_write() 2023-10-27 10:30:55 +01:00