Add missing MD dependency for pkcs5_pbkdf2_hmac
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
diff --git a/include/mbedtls/pkcs5.h b/include/mbedtls/pkcs5.h
index dbbc414..cf15664 100644
--- a/include/mbedtls/pkcs5.h
+++ b/include/mbedtls/pkcs5.h
@@ -90,6 +90,7 @@
unsigned int iteration_count,
uint32_t key_length, unsigned char *output );
+#if defined(MBEDTLS_MD_C)
#if !defined(MBEDTLS_DEPRECATED_REMOVED)
/**
* \brief PKCS#5 PBKDF2 using HMAC
@@ -113,6 +114,7 @@
unsigned int iteration_count,
uint32_t key_length, unsigned char *output );
#endif /* !MBEDTLS_DEPRECATED_REMOVED */
+#endif /* MBEDTLS_MD_C */
#if defined(MBEDTLS_SELF_TEST)
/**
diff --git a/library/pkcs5.c b/library/pkcs5.c
index 60ad11f..d73f203 100644
--- a/library/pkcs5.c
+++ b/library/pkcs5.c
@@ -208,6 +208,7 @@
}
#endif /* MBEDTLS_ASN1_PARSE_C */
+#if defined(MBEDTLS_MD_C)
#if defined(MBEDTLS_DEPRECATED_REMOVED)
static
#endif
@@ -292,6 +293,7 @@
return( ret );
}
+#endif /* MBEDTLS_MD_C */
int mbedtls_pkcs5_pbkdf2_hmac_ext( mbedtls_md_type_t md_alg,
const unsigned char *password,
@@ -418,7 +420,7 @@
ret = MBEDTLS_ERR_ERROR_GENERIC_ERROR;
return ( ret );
-#endif
+#endif /* !MBEDTLS_MD_C */
}
#if defined(MBEDTLS_SELF_TEST)