[tf-psa-crypto] tests: pk: add a common function to create a PSA key out of predefined keys #600

Merged
valeriosetti merged 6 commits from issue598 into development 2026-01-22 13:25:54 -06:00
valeriosetti commented 2025-12-11 03:44:37 -06:00 (Migrated from github.com)

Description

Resolves #598
Depends on https://github.com/Mbed-TLS/mbedtls-framework/pull/257

PR checklist

## Description Resolves #598 Depends on https://github.com/Mbed-TLS/mbedtls-framework/pull/257 ## PR checklist - [x] **changelog** not required because: only test changes - [x] **framework PR** provided https://github.com/Mbed-TLS/mbedtls-framework/pull/257 - [x] **mbedtls development PR** not required because: no change there - [x] **mbedtls 3.6 PR** not required because: no backport - **tests** provided
bjwtaylor (Migrated from github.com) reviewed 2026-01-06 05:28:43 -06:00
gilles-peskine-arm (Migrated from github.com) reviewed 2026-01-20 12:22:43 -06:00
gilles-peskine-arm (Migrated from github.com) left a comment
No description provided.
LGTM, although the behavior on failure is fragile and I'd prefer to properly stop on failure.
valeriosetti (Migrated from github.com) reviewed 2026-01-21 02:49:56 -06:00
@ -239,9 +206,19 @@ static int pk_setup(mbedtls_pk_context *pk, mbedtls_pk_type_t pk_type, int curve
valeriosetti (Migrated from github.com) commented 2026-01-21 02:49:56 -06:00

Yeah, sorry. This dates back to the original implementation of mbedtls_pk_helpers_get_predefined_key_data which didn't returned any value. I will update this immediately

Yeah, sorry. This dates back to the original implementation of `mbedtls_pk_helpers_get_predefined_key_data` which didn't returned any value. I will update this immediately
gilles-peskine-arm (Migrated from github.com) reviewed 2026-01-21 07:23:27 -06:00
@ -377,30 +360,14 @@ static psa_status_t pk_psa_setup(psa_key_type_t type, size_t bits,
* - speed up testing and
gilles-peskine-arm (Migrated from github.com) commented 2026-01-21 07:23:27 -06:00

This is still missing the value return check. Otherwise LGTM

This is still missing the value return check. Otherwise LGTM
gilles-peskine-arm (Migrated from github.com) approved these changes 2026-01-22 06:23:06 -06:00
gilles-peskine-arm (Migrated from github.com) left a comment

LGTM

LGTM
bjwtaylor (Migrated from github.com) approved these changes 2026-01-22 09:04:36 -06:00
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-Mbed-TLS/TF-PSA-Crypto!600
No description provided.