Make output_byte return not_supported for pbkdf2
As output functionality is not added yet return PSA_SUCCESS for
now if inputs are passed correctly. If input validation fails
operation is aborted and output_bytes will return PSA_ERROR_BAD_STATE
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com>
diff --git a/library/psa_crypto.c b/library/psa_crypto.c
index a289895..2a4ac7b 100644
--- a/library/psa_crypto.c
+++ b/library/psa_crypto.c
@@ -5492,6 +5492,15 @@
&operation->ctx.tls12_ecjpake_to_pms, output, output_length);
} else
#endif /* MBEDTLS_PSA_BUILTIN_ALG_TLS12_ECJPAKE_TO_PMS */
+#if defined(MBEDTLS_PSA_BUILTIN_ALG_PBKDF2_HMAC)
+ if (PSA_ALG_IS_PBKDF2_HMAC(kdf_alg)) {
+ /* As output functionality is not added yet return
+ * PSA_ERROR_NOT_SUPPORTED for now if inputs are passed correctly.
+ * If input validation fails operation is aborted and output_bytes
+ * will return PSA_ERROR_BAD_STATE */
+ status = PSA_ERROR_NOT_SUPPORTED;
+ } else
+#endif /* MBEDTLS_PSA_BUILTIN_ALG_PBKDF2_HMAC */
{
(void) kdf_alg;