psa_crypto: allow asymmetric encryption/decryption also with opaque keys

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
This commit is contained in:
Valerio Setti 2024-01-15 10:43:16 +01:00
parent f202c2968b
commit 5bb454aace

View file

@ -3080,7 +3080,7 @@ psa_status_t psa_asymmetric_encrypt(mbedtls_svc_key_id_t key,
return PSA_ERROR_INVALID_ARGUMENT;
}
status = psa_get_and_lock_transparent_key_slot_with_policy(
status = psa_get_and_lock_key_slot_with_policy(
key, &slot, PSA_KEY_USAGE_ENCRYPT, alg);
if (status != PSA_SUCCESS) {
return status;
@ -3132,7 +3132,7 @@ psa_status_t psa_asymmetric_decrypt(mbedtls_svc_key_id_t key,
return PSA_ERROR_INVALID_ARGUMENT;
}
status = psa_get_and_lock_transparent_key_slot_with_policy(
status = psa_get_and_lock_key_slot_with_policy(
key, &slot, PSA_KEY_USAGE_DECRYPT, alg);
if (status != PSA_SUCCESS) {
return status;