From 14aef9875833b92436ca36ff167e5c765ea857d1 Mon Sep 17 00:00:00 2001 From: Waleed Elmelegy Date: Wed, 20 Nov 2024 11:53:49 +0000 Subject: [PATCH] Add internal iop export public-key abort API Signed-off-by: Waleed Elmelegy --- tf-psa-crypto/drivers/builtin/src/psa_crypto_ecp.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tf-psa-crypto/drivers/builtin/src/psa_crypto_ecp.c b/tf-psa-crypto/drivers/builtin/src/psa_crypto_ecp.c index a3ceb01c7e..b58587f728 100644 --- a/tf-psa-crypto/drivers/builtin/src/psa_crypto_ecp.c +++ b/tf-psa-crypto/drivers/builtin/src/psa_crypto_ecp.c @@ -679,6 +679,16 @@ exit: return status; } +psa_status_t mbedtls_psa_ecp_export_public_key_iop_abort( + mbedtls_psa_export_public_key_iop_operation_t *operation) +{ + mbedtls_ecp_keypair_free(operation->key); + mbedtls_free(operation->key); + mbedtls_ecp_restart_free(&operation->restart_ctx); + operation->num_ops = 0; + return PSA_SUCCESS; +} + #endif /****************************************************************/ /* Interruptible ECC Key Agreement */