-
Notifications
You must be signed in to change notification settings - Fork 13
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
CoAP: early token generation #668
base: main
Are you sure you want to change the base?
Commits on Nov 5, 2024
-
zephyr_coap_req: remove unimplemented golioth_coap_req_sync()
Remove prototype for function that is never defined. Signed-off-by: Mike Szczys <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e792791 - Browse repository at this point
Copy the full SHA e792791View commit details
Commits on Nov 7, 2024
-
coap_client: define coap token length
Use a compile-time constant for the length of the CoAP token (in bytes). Signed-off-by: Mike Szczys <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a958861 - Browse repository at this point
Copy the full SHA a958861View commit details
Commits on Nov 8, 2024
-
coap_client: add CoAP token generator golioth_coap_next_token()
Add golioth_coap_next_token() to randomly generate the first token and increment a stored value for all future tokens. Signed-off-by: Mike Szczys <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 5c6eb02 - Browse repository at this point
Copy the full SHA 5c6eb02View commit details -
coap_client: add token generation to coap get requests
Squash before merging Signed-off-by: Mike Szczys <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 06e97cf - Browse repository at this point
Copy the full SHA 06e97cfView commit details -
coap get: update get calls to assign coap token
Squash before merging Signed-off-by: Mike Szczys <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for fbc75f0 - Browse repository at this point
Copy the full SHA fbc75f0View commit details -
coap_get_block: update blockwise download to assign coap tokens
Squash before merge Signed-off-by: Mike Szczys <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 9586e08 - Browse repository at this point
Copy the full SHA 9586e08View commit details -
coap_client: add token generation to coap set requests
Squash before merging Signed-off-by: Mike Szczys <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for cd3b9de - Browse repository at this point
Copy the full SHA cd3b9deView commit details -
coap set: update set calls to assign coap token
TODO: unit tests for RPC Signed-off-by: Mike Szczys <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 1933111 - Browse repository at this point
Copy the full SHA 1933111View commit details -
coap_set_block: update blockwise upload to assign coap tokens
Squash before merge Signed-off-by: Mike Szczys <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 4d81dcf - Browse repository at this point
Copy the full SHA 4d81dcfView commit details -
coap: observe/rpc: create token when making request
Squash before merge. Signed-off-by: Mike Szczys <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3f29df2 - Browse repository at this point
Copy the full SHA 3f29df2View commit details -
coap: unit tests: add token param to fakes
Squash before merge Signed-off-by: Mike Szczys <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for fecfbbc - Browse repository at this point
Copy the full SHA fecfbbcView commit details -
coap: zephyr: use token param when creating CoAP requests
Squah before merging Signed-off-by: Mike Szczys <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 51e22b0 - Browse repository at this point
Copy the full SHA 51e22b0View commit details -
coap: zephyr: remove token overwrite for blockwise operations
Tokens are now generated by the calling function. The same token will automatically be used for each subsequent block because of the blockwise_transfer context struct. The workaround that overwrite the initial token for these requests is no longer necessary and has been removed. Squash before merging Signed-off-by: Mike Szczys <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for bf5671d - Browse repository at this point
Copy the full SHA bf5671dView commit details -
coap: libcoap: use request_msg token and remove block_token
Directly use the token stored in the request message instead of creating a new one. Remove the block_token storage from the client struct. Squash before merging Signed-off-by: Mike Szczys <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 5cc43f1 - Browse repository at this point
Copy the full SHA 5cc43f1View commit details -
coap: libcoap: remove srand call and add comments about CoAP tokens
CoAP tokens are now generated by the Golioth SDK outside of the libcoap library. The call to golioth_sys_srand() in the libcoap client is no longer crucial as it will be called by Golioth's token generation function. However, the random seed initialization for libcoap's token generation should still be called just to ensure token generation is ready in the rare (and currently unanticipated) case where libcoap internally fetches a new token. One place that this is likely to occur is when libcoap uses etags. We are not currently using etags in our implementation. Use dynamically allocated memory to seed the token. This value will be stored in the libcoap coap_session_t struct and the seed array will no longer be needed. Note, both Golioth and libcoap token generation uses a simple increment after generating the initial random token. Avoid collision by getting a token from Golioth and incrementing it by half its max value before seeding libcoap. Signed-off-by: Mike Szczys <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 8f8d7b1 - Browse repository at this point
Copy the full SHA 8f8d7b1View commit details -
coap: remove token_len from golioth_coap_request_msg struct
This value is now available as a compile-time constant. Squash before merge Signed-off-by: Mike Szczys <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for b7af162 - Browse repository at this point
Copy the full SHA b7af162View commit details -
coap: observations: remove token_len and normalize param order
Remove the token_len parameter as the compile-time define is now used throughout the SDK. Change the appearance and type of the token param to match what is used with other functions that create coap requests. Signed-off-by: Mike Szczys <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 78973cc - Browse repository at this point
Copy the full SHA 78973ccView commit details