diff --git a/tf-psa-crypto/core/psa_crypto.c b/tf-psa-crypto/core/psa_crypto.c index 310dab8a22..038bd986c0 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_complete(psa_export_public_key_iop_t *ope 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 @@ psa_status_t psa_generate_key_iop_abort( #endif } - /****************************************************************/ /* Module setup */ /****************************************************************/