From c4e1dcf006318c6c5f6d671c703bae4a65e188ae Mon Sep 17 00:00:00 2001 From: Paul Elliott Date: Fri, 23 Apr 2021 18:59:23 +0100 Subject: [PATCH] Fix incorrect PSA key usage Signed-off-by: Paul Elliott --- 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 6598cf43a..a6d0cdb20 100644 --- a/library/psa_crypto.c +++ b/library/psa_crypto.c @@ -3227,7 +3227,7 @@ psa_status_t psa_aead_encrypt_setup( psa_aead_operation_t *operation, return( PSA_ERROR_NOT_SUPPORTED ); status = psa_get_and_lock_key_slot_with_policy( - key, &slot, PSA_KEY_USAGE_DECRYPT, alg ); + key, &slot, PSA_KEY_USAGE_ENCRYPT, alg ); if( status != PSA_SUCCESS ) {