From 7db010943673ab7bc9b915a6f95616ef29ed04ac Mon Sep 17 00:00:00 2001
From: Paul Bakker
Date: Tue, 10 Sep 2013 11:10:57 +0200
Subject: [PATCH] Made POLARSSL_MD_MAX_SIZE dependent on POLARSSL_SHA512_C
---
include/polarssl/md.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/include/polarssl/md.h b/include/polarssl/md.h
index f7b8bd327..eecf78113 100644
--- a/include/polarssl/md.h
+++ b/include/polarssl/md.h
@@ -60,7 +60,11 @@ typedef enum {
POLARSSL_MD_SHA512,
} md_type_t;
+#if defined(POLARSSL_SHA512_C)
#define POLARSSL_MD_MAX_SIZE 64 /* longest known is SHA512 */
+#else
+#define POLARSSL_MD_MAX_SIZE 32 /* longest known is SHA256 or less */
+#endif
/**
* Message digest information. Allows message digest functions to be called