Skip to content

Fix PSA lifetime persistence argument#731

Open
parmi93 wants to merge 2 commits intoMbed-TLS:developmentfrom
parmi93:patch-2
Open

Fix PSA lifetime persistence argument#731
parmi93 wants to merge 2 commits intoMbed-TLS:developmentfrom
parmi93:patch-2

Conversation

@parmi93
Copy link
Copy Markdown

@parmi93 parmi93 commented Mar 30, 2026

Pass PSA_KEY_PERSISTENCE_DEFAULT to PSA_KEY_LIFETIME_FROM_PERSISTENCE_AND_LOCATION() instead of PSA_KEY_LIFETIME_PERSISTENT. The macro expects a psa_key_persistence_t, but the previous code incorrectly passed a value already representing a constructed lifetime. This aligns the call with the API specification and ensures correct lifetime construction.

Pass `PSA_KEY_PERSISTENCE_DEFAULT` to
`PSA_KEY_LIFETIME_FROM_PERSISTENCE_AND_LOCATION()` instead of
`PSA_KEY_LIFETIME_PERSISTENT`. The macro expects a
`psa_key_persistence_t`, but the previous code incorrectly passed a
value already representing a constructed lifetime. This aligns the call
with the API specification and ensures correct lifetime construction.

Signed-off-by: Parminder Singh <parminder.sh93@gmail.com>
@bjwtaylor
Copy link
Copy Markdown
Contributor

Hi @parmi93, many thanks for submitting this. It looks like the branch on you fork is based of a fairly old commit form tf-psa-crypto. Are you able to update the fork and rebase, as I think the current CI issue is unrelated to your changes and should disappear if you pull in the relevant changes.

@bjwtaylor bjwtaylor self-assigned this Apr 30, 2026
@parmi93
Copy link
Copy Markdown
Author

parmi93 commented Apr 30, 2026

Hi @bjwtaylor I merged the upstream development branch into my branch (patch-2).

@bjwtaylor bjwtaylor added the bug Something isn't working label May 1, 2026
@bjwtaylor bjwtaylor removed their assignment May 1, 2026
@bjwtaylor bjwtaylor added needs-review Every commit must be reviewed by at least two team members needs-reviewer This PR needs someone to pick it up for review size-xs Estimated task size: extra small (a few hours at most) labels May 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working needs-review Every commit must be reviewed by at least two team members needs-reviewer This PR needs someone to pick it up for review size-xs Estimated task size: extra small (a few hours at most)

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants