Individual setters for persistent key attributes #109
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!109
Loading…
Reference in a new issue
No description provided.
Delete branch "psa-key_attributes-set_persistent"
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?
Use individual setters for the id and lifetime fields of an attribute structure, like the other attributes.
@ -229,2 +257,3 @@psa_key_lifetime_t lifetime);static void psa_set_key_lifetime(psa_key_attributes_t *attributes,psa_key_lifetime_t lifetime);What should happen if the caller specifies
id0 here? Is this invalid? I think we need some more documentation here.So, 0 is now officially an invalid id? What's the best place to document this?
@ -663,10 +663,8 @@* Then you may create and use a key as follows:Missing
&attributeshere?Rework of https://github.com/ARMmbed/mbed-crypto/pull/104 coming up.
@ -229,2 +257,3 @@psa_key_lifetime_t lifetime);static void psa_set_key_lifetime(psa_key_attributes_t *attributes,psa_key_lifetime_t lifetime);The functions have special cases to preserve the invariant that
id = 0iflifetime = VOLATILE. Butid = 0withlifetime ≠ VOLATILEis ok as the intermediate state if you callset_key_lifetimefirst, thenset_key_id. Do you think there should be a special case forid=0?@ -663,10 +663,8 @@* Then you may create and use a key as follows:I amended the corresponding commit.
@ -229,2 +257,3 @@psa_key_lifetime_t lifetime);static void psa_set_key_lifetime(psa_key_attributes_t *attributes,psa_key_lifetime_t lifetime);id = 0should be allowed as an intermediate state, and when the attributes are actually used, an error can be returned if the id is invalid.@ -203,30 +206,56 @@ psa_status_t psa_crypto_init(void);*/or, better
@ -203,30 +206,56 @@ psa_status_t psa_crypto_init(void);*/I don't think it's useful to specify what's going into the structure in this sentence. But I fixed the grammar and clarified a few things.
CI failure is ABI job (known to fail until https://github.com/ARMmbed/mbedtls/pull/2636 lands in the development branch) and
USE_PSA_CRYPTO, which doesn't work on the API branch.