Skip to content

Commit 4054a5b

Browse files
BenBaratteFlavio Ceolin
authored and
Flavio Ceolin
committed
Allow SE key to use key vendor id within PSA crypto
applied using: git am modules/tee/tf-m/trusted-firmware-m/lib/ext/mbedcrypto/\ 0006-Initialise-driver-wrappers-as-first-step-in-psa_cryp.patch applied using: git am modules/tee/tf-m/trusted-firmware-m/lib/ext/mbedcrypto/\ 0007-Allow-SE-key-to-use-key-vendor-id-within-PSA-crypto.patch Signed-off-by: Benjamin Baratte <[email protected]> Signed-off-by: Joakim Andersson <[email protected]> Signed-off-by: David Brown <[email protected]>
1 parent 8f62cee commit 4054a5b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

library/psa_crypto.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1573,7 +1573,11 @@ static psa_status_t psa_validate_key_attributes(
15731573
return PSA_ERROR_INVALID_ARGUMENT;
15741574
}
15751575
} else {
1576+
#ifdef MBEDTLS_PSA_CRYPTO_SE_C
1577+
if (!psa_is_valid_key_id(psa_get_key_id(attributes), 1)) {
1578+
#else
15761579
if (!psa_is_valid_key_id(psa_get_key_id(attributes), 0)) {
1580+
#endif
15771581
return PSA_ERROR_INVALID_ARGUMENT;
15781582
}
15791583
}

0 commit comments

Comments
 (0)