- Added a generic entropy accumulator that provides support for adding custom entropy sources and added some generic and platform dependent entropy sources
diff --git a/library/error.c b/library/error.c
index afe8e45..d5ad617 100644
--- a/library/error.c
+++ b/library/error.c
@@ -59,6 +59,10 @@
#include "polarssl/dhm.h"
#endif
+#if defined(POLARSSL_ENTROPY_C)
+#include "polarssl/entropy.h"
+#endif
+
#if defined(POLARSSL_MD_C)
#include "polarssl/md.h"
#endif
@@ -391,6 +395,13 @@
snprintf( buf, buflen, "DES - The data input has an invalid length" );
#endif /* POLARSSL_DES_C */
+#if defined(POLARSSL_ENTROPY_C)
+ if( use_ret == -(POLARSSL_ERR_ENTROPY_SOURCE_FAILED) )
+ snprintf( buf, buflen, "ENTROPY - Critical entropy source failure" );
+ if( use_ret == -(POLARSSL_ERR_ENTROPY_MAX_SOURCES) )
+ snprintf( buf, buflen, "ENTROPY - No more sources can be added" );
+#endif /* POLARSSL_ENTROPY_C */
+
#if defined(POLARSSL_NET_C)
if( use_ret == -(POLARSSL_ERR_NET_UNKNOWN_HOST) )
snprintf( buf, buflen, "NET - Failed to get an IP address for the given hostname" );