Update descryption of HKDF-Extract/Expand algs and fix comment
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
diff --git a/library/psa_crypto.c b/library/psa_crypto.c
index 0783697..4462a32 100644
--- a/library/psa_crypto.c
+++ b/library/psa_crypto.c
@@ -5194,7 +5194,6 @@
return( PSA_SUCCESS );
}
case PSA_KEY_DERIVATION_INPUT_SECRET:
- /* If no salt was provided, use an empty salt. */
if( PSA_ALG_IS_HKDF_EXPAND( kdf_alg ) )
{
if( hkdf->state != HKDF_STATE_INIT )
@@ -5207,6 +5206,7 @@
}
else
{
+ /* If no salt was provided, use an empty salt. */
if( hkdf->state == HKDF_STATE_INIT )
{
status = psa_key_derivation_start_hmac( &hkdf->hmac,