- Added a generic entropy accumulator that provides support for adding custom entropy sources and added some generic and platform dependent entropy sources

This commit is contained in:
Paul Bakker 2011-12-03 21:45:14 +00:00
parent 1bc9efc00a
commit 6083fd252d
17 changed files with 771 additions and 20 deletions

View file

@ -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 @@ void error_strerror( int ret, char *buf, size_t buflen )
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" );