mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-08-08 00:23:39 +08:00
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:
@@ -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 */
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user