Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update libcoap to include support for DTLS Connection IDs #163

Merged
merged 11 commits into from
Sep 10, 2023

Conversation

hasheddan
Copy link
Contributor

@hasheddan hasheddan commented Sep 1, 2023

Updates libcoap to 4abe0ea to pick up DTLS Connection ID support, which was
added in obgm/libcoap#1153.

Signed-off-by: Daniel Mangum georgedanielmangum@gmail.com

hasheddan

This comment was marked as resolved.

@github-actions
Copy link

github-actions bot commented Sep 1, 2023

Visit the preview URL for this PR (updated for commit 2449f83):

https://golioth-firmware-sdk-doxygen-dev--pr163-feat-esp-idf-l-kdt2w4ag.web.app

(expires Sun, 17 Sep 2023 21:14:51 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: a9993e61697a3983f3479e468bcb0b616f9a0578

@hasheddan

This comment was marked as outdated.

hasheddan

This comment was marked as resolved.

@hasheddan hasheddan force-pushed the feat/esp-idf-libcoap-cid branch 4 times, most recently from 8165aea to f756ee6 Compare September 6, 2023 19:35
@hasheddan hasheddan changed the title Switch to using esp-idf libcoap component and enable mbedTLS DTLS 1.2 Connection IDs by default Update libcoap to include support for DTLS Connection IDs Sep 6, 2023
Copy link
Contributor Author

@hasheddan hasheddan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is currently now only blocked on espressif/esp-idf#12177, which we could work around for the time-being by not enabling CONFIG_MBEDTLS_SSL_DTLS_CONNECTION_ID.

@hasheddan hasheddan marked this pull request as ready for review September 6, 2023 19:41
Updates libcoap to 4abe0ea to pick up DTLS Connection ID support, which was
added in obgm/libcoap#1153.

Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
Updates esp_idf port to accommodate the new version of libcoap, which
includes updating included file names, as well as setting new config
values.

Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
@hasheddan hasheddan force-pushed the feat/esp-idf-libcoap-cid branch 2 times, most recently from 22b901d to 4da1518 Compare September 7, 2023 15:39
@hasheddan hasheddan self-assigned this Sep 7, 2023
Updates the list of included headers from the new libcoap version in the
Zephyr port.

Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
Updates the list of targets in the libcoap Zephyr port to accommodate
renaming and additions.

Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
Matches the upstream change in libcoap.

See obgm/libcoap@aa34b5f.

Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
Utilizes the new layers in libcoap that allows for one layer to pass data
to and from the next without explicitly specifying the type of the next
layer.

Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
Renames the libcoap zephyr files to match the new upstream naming scheme.

Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
Sets the CID supported socket option when the mbedTLS config has been set.
This will cause devices to send CIDs that are negotiated with the server,
but will not request that the server does the same.

Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
@hasheddan hasheddan force-pushed the feat/esp-idf-libcoap-cid branch 2 times, most recently from a5c0de2 to 0efb076 Compare September 7, 2023 21:01
Enables coredump decode in esp-idf test so that we can get a stack trace
without having to access the binary.

Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
hasheddan

This comment was marked as resolved.

Removes the coap_cleanup() call when ending a session as it destroys
resources that are required for ongoing operation.

Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
@@ -966,6 +966,9 @@ golioth_client_t golioth_client_create(const golioth_client_config_t* config) {
time_t t;
srand(time(&t));

// Initialize libcoap prior to any coap_* function calls.
coap_startup();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should reorder this so it comes before the calls to coap_set_log_*() in this function above.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah good catch -- updated!

@sam-golioth sam-golioth mentioned this pull request Sep 8, 2023
If coap_startup() is not called prior to any other coap_* function calls, a
warning is emitted.

```
coap_startup() should be called before any other coap_*() functions are
called
```

This proactively calls coap_startup() to ensure the library is initialized,
even though coap_new_context() will do so implicitly.

Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
@hasheddan hasheddan merged commit 17e2f25 into golioth:main Sep 10, 2023
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants