Add PSA iop export public-key abort API
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
diff --git a/tf-psa-crypto/core/psa_crypto.c b/tf-psa-crypto/core/psa_crypto.c
index 310dab8..038bd98 100644
--- a/tf-psa-crypto/core/psa_crypto.c
+++ b/tf-psa-crypto/core/psa_crypto.c
@@ -1762,9 +1762,19 @@
psa_status_t psa_export_public_key_iop_abort(psa_export_public_key_iop_t *operation)
{
- (void) operation;
+#if defined(MBEDTLS_ECP_RESTARTABLE)
+ psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED;
- return PSA_ERROR_NOT_SUPPORTED;
+ status = psa_export_public_key_iop_abort_internal(operation);
+
+ operation->num_ops = 0;
+ operation->error_occurred = 0;
+
+ return status;
+#else
+ (void) operation;
+ return PSA_SUCCESS;
+#endif
}
/** Validate that a key policy is internally well-formed.
@@ -8510,7 +8520,6 @@
#endif
}
-
/****************************************************************/
/* Module setup */
/****************************************************************/