Implement md_file in the MD layer
diff --git a/include/mbedtls/md.h b/include/mbedtls/md.h
index 3164788..cb3e058 100644
--- a/include/mbedtls/md.h
+++ b/include/mbedtls/md.h
@@ -247,6 +247,7 @@
int mbedtls_md( const mbedtls_md_info_t *md_info, const unsigned char *input, size_t ilen,
unsigned char *output );
+#if defined(MBEDTLS_FS_IO)
/**
* \brief Output = message_digest( file contents )
*
@@ -259,7 +260,8 @@
* MBEDTLS_ERR_MD_BAD_INPUT_DATA if md_info was NULL.
*/
int mbedtls_md_file( const mbedtls_md_info_t *md_info, const char *path,
- unsigned char *output );
+ unsigned char *output );
+#endif /* MBEDTLS_FS_IO */
/**
* \brief Set HMAC key and prepare to authenticate a new message.
diff --git a/include/mbedtls/md_internal.h b/include/mbedtls/md_internal.h
index d42dc5c..8cc8c5b 100644
--- a/include/mbedtls/md_internal.h
+++ b/include/mbedtls/md_internal.h
@@ -71,9 +71,6 @@
void (*digest_func)( const unsigned char *input, size_t ilen,
unsigned char *output );
- /** Generic file digest function */
- int (*file_func)( const char *path, unsigned char *output );
-
/** Allocate a new context */
void * (*ctx_alloc_func)( void );