Changeset 1001
- Timestamp:
- 07/07/07 13:15:46 (1 year ago)
- Files:
-
- 1.8.3/branches/devel/CHANGES.182 (modified) (2 diffs)
- 1.8.3/branches/devel/src/myssl.c (modified) (4 diffs)
- 1.8.3/branches/devel/src/utils.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
1.8.3/branches/devel/CHANGES.182
r981 r1001 14 14 ========================================================================== 15 15 16 Version 1.8.2 patchlevel 6 ??? ??, 200716 Version 1.8.2 patchlevel 6 July 9, 2007 17 17 18 18 Development team changes: 19 * After many years, Talek has retired from development. 19 * After many years of valuable work, Talek has retired from 20 development. 20 21 21 22 Minor changes: … … 27 28 * Fixed assorted small memory leaks. [SW] 28 29 * Fixed handling of telnet NOPs sent by clients. [SW] 30 * The OpenSSL random number pool wasn't getting adequately 31 initialized on systems without /dev/urandom 29 32 30 33 Version 1.8.2 patchlevel 5 June 13, 2007 1.8.3/branches/devel/src/myssl.c
r931 r1001 75 75 #include <openssl/dh.h> 76 76 #include <openssl/evp.h> 77 #include <openssl/rand.h> 77 78 78 79 #include "conf.h" … … 107 108 static SSL_CTX *ctx = NULL; 108 109 110 uint32_t genrand_int32(void); 111 109 112 /** Initialize the SSL context. 110 113 * \return pointer to SSL context object. … … 116 119 unsigned char context[128]; 117 120 DH *dh; 121 unsigned int reps = 1; 118 122 119 123 if (!bio_err) { … … 124 128 bio_err = BIO_new_fp(stderr, BIO_NOCLOSE); 125 129 } 126 #ifndef HAS_DEV_URANDOM 127 /* We need to seed the RNG with RAND_seed() or RAND_egd() here. 128 * Where are we going to get an unpredictable seed? 129 */ 130 #endif 130 131 do_rawlog(LT_ERR, "Seeding OpenSSL random number pool."); 132 while (!RAND_status()) { 133 /* At this point, a system with /dev/urandom or a EGD file in the usual 134 places will have enough entropy. Otherwise, be lazy and use random numbers 135 until it's satisfied. */ 136 uint32_t gibberish[4]; 137 int n; 138 139 for (n = 0; n < 4; n++) 140 gibberish[n] = genrand_int32(); 141 142 RAND_seed(gibberish, sizeof gibberish); 143 144 reps += 1; 145 } 146 147 do_rawlog(LT_ERR, "Seeded after %u %s.", reps, reps > 1 ? "cycles" : "cycle"); 148 131 149 132 150 /* Set up SIGPIPE handler here? */ 1.8.3/branches/devel/src/utils.c
r979 r1001 53 53 dbref find_entrance(dbref door); 54 54 void initialize_mt(void); 55 static unsigned longgenrand_int32(void);55 uint32_t genrand_int32(void); 56 56 static void init_genrand(unsigned long); 57 57 static void init_by_array(unsigned long *, int); … … 682 682 683 683 /* generates a random number on [0,0xffffffff]-interval */ 684 static unsigned long 684 uint32_t 685 685 genrand_int32(void) 686 686 {
