psa: Check generator validity before read #57
No reviewers
Labels
No labels
api-spec
bug
CLA requested
CLA valid
compliance
DO NOT MERGE
duplicate
enhancement
feature branch
good first issue
HEADER FORMATTING ISSUE
help wanted
Information
invalid
Jira status: AWAITING REVIEW
Jira status: CLOSED
Jira status: DONE
Jira status: IN PROGRESS
Jira status: IN REVIEW
Jira status: OPEN
Jira status: REOPENED
Jira status: RESOLVED
mirrored
mirror internally
needs: backports
needs: ci
needs: design review
needs: preceding PR
needs: review
needs: work
notabug
open for community contribution
Product Backlog
question
ready for merge
security
stale
type: bug
type: enhancement
type: question
web pages
wontfix
writing
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-ARMmbed/mbed-crypto!57
Loading…
Reference in a new issue
No description provided.
Delete branch "check-generator-validity"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Check generator validity (i.e. that alg has been initialized) before
allowing reads from the generator or allowing reads of the generator's
capacity.
This aligns our implementation with the documented error code behavior
in our crypto.h and the PSA Crypto API.
Fixes https://github.com/ARMmbed/mbedtls-psa/issues/183
The changes look good to me.
Besides the tests fixed here are there any other instances that could affected by the change in behavior? (e.g. example repo, IPC parameter checks in IPC)?
A single typo, otherwise looks good to me
@ -3911,7 +3922,13 @@ psa_status_t psa_generator_read( psa_crypto_generator_t *generator,exit:Typo: exhaused -> exhausted
Rebasing to address review comments and to resolve merge conflicts.
Rebased. Unfortunately, the base change had to happen in order to get the merge conflicts resolved, and we've merged the latest Mbed TLS code in (so the base is quite different).
Probably easiest to diff between diffs on this one instead of using GitHub's "force-pushed" diff.
Old branch up at https://github.com/Patater/mbed-crypto/tree/check-generator-validity-1
CI failure is the FreeBSD timing test, a known flaky test.