added ECP_SUPPORT in opt.h (disabled by default); renamed MD5_SUPPORT to PPP_MD5_RANDM, which is more meaningful

This commit is contained in:
Sylvain Rochet
2012-06-03 13:07:46 +02:00
parent 9c35403b98
commit 05c84a147d
3 changed files with 17 additions and 10 deletions

View File

@@ -80,7 +80,7 @@
#include "polarssl/md5.h"
#include "magic.h"
#if MD5_SUPPORT /* Using MD5 for better randomness if MD5 support is enabled */
#if PPP_MD5_RANDM /* Using MD5 for better randomness if enabled */
#define MAGIC_RANDPOOLSIZE 16 /* Bytes stored in the pool of randomness. */
@@ -187,7 +187,7 @@ u32_t magic() {
return new_rand;
}
#else /* MD5_SUPPORT */
#else /* PPP_MD5_RANDM */
/*****************************/
/*** LOCAL DATA STRUCTURES ***/
@@ -258,6 +258,6 @@ u32_t magic() {
return ((((u32_t)rand() << 16) + rand()) + magic_randomseed);
}
#endif /* MD5_SUPPORT */
#endif /* PPP_MD5_RANDM */
#endif /* PPP_SUPPORT */

View File

@@ -100,7 +100,7 @@ void magic_randomize(void);
*/
u32_t magic(void); /* Returns the next magic number */
#if MD5_SUPPORT
#if PPP_MD5_RANDM
/*
* Fill buffer with random bytes
*
@@ -112,7 +112,7 @@ u32_t magic(void); /* Returns the next magic number */
* the first use.
*/
void random_bytes(unsigned char *buf, u32_t len);
#endif /* MD5_SUPPORT */
#endif /* PPP_MD5_RANDM */
#endif /* PPP_SUPPORT */
#endif /* MAGIC_H */