From bbedfcec2ea5877c3a333b8c2c09642bca1797d0 Mon Sep 17 00:00:00 2001 From: Ryan Everett Date: Wed, 14 Feb 2024 18:22:09 +0000 Subject: [PATCH] Make multi-part PAKE operations thread-safe The only interaction with key IDs here is in the changed function. Simultaneous API calls on the same operation object are not thread-safe. Signed-off-by: Ryan Everett --- library/psa_crypto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/psa_crypto.c b/library/psa_crypto.c index b7c891eb77..b16fac16fe 100644 --- a/library/psa_crypto.c +++ b/library/psa_crypto.c @@ -7953,7 +7953,7 @@ exit: if (status != PSA_SUCCESS) { psa_pake_abort(operation); } - unlock_status = psa_unregister_read(slot); + unlock_status = psa_unregister_read_under_mutex(slot); return (status == PSA_SUCCESS) ? unlock_status : status; }