pk: fixing backport issues
Note: RSA is not supported in mbedtls-2.28 for opaque wrapping
so it was removed from test_suite_pkwrite.data.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
diff --git a/library/pk.c b/library/pk.c
index 97984f3..12f4120 100644
--- a/library/pk.c
+++ b/library/pk.c
@@ -672,7 +672,7 @@
status = psa_import_key(&attributes, d, d_len, key);
mbedtls_platform_zeroize(d, sizeof(d));
if (status != PSA_SUCCESS) {
- return PSA_PK_TO_MBEDTLS_ERR(status);
+ return MBEDTLS_ERR_PK_HW_ACCEL_FAILED;
}
/* make PK context wrap the key slot */