From 3128c5d9ceaf5cbb9c714a0a1a85a1bf4793d180 Mon Sep 17 00:00:00 2001 From: Kusumit Ghoderao Date: Wed, 3 May 2023 12:27:57 +0530 Subject: [PATCH] Enable can_output_key with PSA_KEY_DERIVATION_INPUT_PASSWORD Signed-off-by: Kusumit Ghoderao --- library/psa_crypto.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/library/psa_crypto.c b/library/psa_crypto.c index bf3f2a004c..849bb95a6e 100644 --- a/library/psa_crypto.c +++ b/library/psa_crypto.c @@ -6673,9 +6673,10 @@ psa_status_t psa_key_derivation_input_key( return status; } - /* Passing a key object as a SECRET input unlocks the permission - * to output to a key object. */ - if (step == PSA_KEY_DERIVATION_INPUT_SECRET) { + /* Passing a key object as a SECRET or PASSWORD input unlocks the + * permission to output to a key object. */ + if (step == PSA_KEY_DERIVATION_INPUT_SECRET || + step == PSA_KEY_DERIVATION_INPUT_PASSWORD) { operation->can_output_key = 1; }