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

python: Make safer to use #321

Merged

Conversation

chrysn
Copy link
Collaborator

@chrysn chrysn commented Nov 4, 2024

Previously, a call to .edhoc_exporter() would happily have produced exports from the all-zero key material.

This would have prevented the hiccup I ran into around #312 (comment).

The present change ensures that attempting to run the EDHOC exporter results in a runtime error. aiocoap's tests still pass with it.

I'd prefer to go further, making the initiator start item also an option, or making this all into an enum, or even just using the high-level API, but this way at least we avoid inadvertently poking into data that should already be gone (which is something the high-level API would also ensure we don't do). Also I think that almost none of those items should implement Default. But let's do this here first and take it incrementally.

CC'ing @ElsaLopez133 (why can't I ask you to be a reviewer?) for review and because this might cause subtle (but easy to resolve) breakage with PR #312

Previously, a call to `.edhoc_exporter()` would happily have produced
exports from the all-zero key material.
@chrysn chrysn requested a review from geonnave November 4, 2024 15:35
Copy link
Collaborator

@geonnave geonnave left a comment

Choose a reason for hiding this comment

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

Went through and it looks good to me, thanks!

@geonnave geonnave merged commit 7438588 into openwsn-berkeley:main Nov 5, 2024
37 checks passed
@chrysn chrysn deleted the python-no-zero-keys branch November 6, 2024 01:01
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