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

Release the lock in mbedtls_sha256_free if it was not released already #2105

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

nilswiersma
Copy link

Release the lock in mbedtls_sha256_free if it was not released already. Requires making pico_sha256_unlock include-able. Fixes #2103.

…y. Requires making pico_sha256_unlock include-able. Fixes raspberrypi#2103.
Copy link
Contributor

@kilograham kilograham left a comment

Choose a reason for hiding this comment

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

I think i'd prefer to expose something like

void pico_sha256_cleanup(pico_sha256_state_t *state, sha256_result_t *out) {
   if (state->locked) {
       pico_sha256_unlock(state);
   }
}

@peterharperuk peterharperuk self-assigned this Nov 27, 2024
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.

3 participants