Skip to content

Conversation

@nilswiersma
Copy link
Contributor

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
will-v-pi pushed a commit to will-v-pi/pico-sdk that referenced this pull request Mar 20, 2025
raspberrypi#2105)

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

* addres lock release API comment

* Fix description of pico_sha256_cleanup

---------

Co-authored-by: nils <nils@nils>
Co-authored-by: Peter Harper <[email protected]>
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