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

Merged
merged 3 commits into from
Jan 31, 2025

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
@kilograham kilograham added this to the 2.1.1 milestone Jan 6, 2025
peterharperuk
peterharperuk previously approved these changes Jan 22, 2025
@peterharperuk
Copy link
Contributor

I wrote a test for this. I'll push this if you want @kilograham

@kilograham kilograham merged commit 6c06f90 into raspberrypi:develop Jan 31, 2025
4 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.

3 participants