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

Initialise PSA signing context #263

Conversation

matetothpal
Copy link
Contributor

This PR adds the missing context initialization in the PSA crypto adapter for the restartable case.

The original implementation misses to call psa_sign_hash_interruptible_operation_init() on the PSA sign function context. This doesn't cause a problem as long as the context structure is initialised to all 0, or a previous restartable signing with the same context was concluded earlier. However if the signing context of a previously interrupted signing is reused for a new signing operation, psa_sign_hash_start returns PSA_ERROR_BAD_STATE.

Initialise the PSA signing context in the PSA crypto adapter when the
restartable signing API called with started==false.

Change-Id: I9f5c40d2908f1cd32aa35b8d9562b63873d21471
@laurencelundblade laurencelundblade merged commit 58e70ca into laurencelundblade:dev Nov 4, 2023
14 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.

2 participants