To: "'stunnel-users@mike.daewoo.com.pl'" Date: Fri, 17 Mar 2000 12:51:27 +0100 From: Fabrizio Leone - Mediagest Subject: RE: prng not seeded - stunnel 3.8 and openssl 0.9.5 if you want to try my personal fix, I inserted this code at the begin of the context_init function in ssl.c: #define DIM_BUF 128 unsigned char buf[DIM_BUF]; int l; double r; srand((unsigned int)time(NULL)); r = ( (double) (rand()%DIM_BUF) ) / DIM_BUF; _snprintf(buf, sizeof(buf), "%.0f", r); l = sizeof(buf); RAND_seed(&buf, l); log(LOG_DEBUG, "Generating %d bits of RANDOM data...", l*8); if (RAND_status()==0) log(LOG_DEBUG, "PRNG still contains not sufficient entropy!"); Fabrizio Leone.