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

@ -1741,6 +1741,13 @@
#define CCP_SUPPORT 0
#endif
/**
* ECP_SUPPORT==1: Support ECP. CURRENTLY NOT SUPPORTED! DO NOT SET!
*/
#ifndef ECP_SUPPORT
#define ECP_SUPPORT 0
#endif
/**
* VJ_SUPPORT==1: Support VJ header compression.
*/
@ -1749,10 +1756,10 @@
#endif
/**
* MD5_SUPPORT==1: Support MD5 (see also CHAP).
* PPP_MD5_RANDM==1: Use MD5 for better randomness.
*/
#ifndef MD5_SUPPORT
#define MD5_SUPPORT 0
#ifndef PPP_MD5_RANDM
#define PPP_MD5_RANDM 0
#endif
/**
@ -1788,11 +1795,11 @@
* using our cleaned PolarSSL library.
*/
#if CHAP_SUPPORT || EAP_SUPPORT || MD5_SUPPORT
#if CHAP_SUPPORT || EAP_SUPPORT || PPP_MD5_RANDM
#ifndef LWIP_INCLUDED_POLARSSL_MD5
#define LWIP_INCLUDED_POLARSSL_MD5 1 /* CHAP and EAP require MD5 support */
#endif /* LWIP_INCLUDED_POLARSSL_MD5 */
#endif /* CHAP_SUPPORT || EAP_SUPPORT || MD5_SUPPORT */
#endif /* CHAP_SUPPORT || EAP_SUPPORT || PPP_MD5_RANDM */
#if MSCHAP_SUPPORT
#ifndef LWIP_INCLUDED_POLARSSL_MD4

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 */