Commit 99a97051 authored by Ulf Möller's avatar Ulf Möller
Browse files

pseudo-seed for the PRNG before testing DSA

parent 410243f1
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1030,6 +1030,11 @@ int MAIN(int argc, char **argv)

	RAND_pseudo_bytes(buf,20);
#ifndef NO_DSA
	if (RAND_status() != 1)
		{
		RAND_seed(rnd_seed, sizeof rnd_seed);
		rnd_fake = 1;
		}
	for (j=0; j<DSA_NUM; j++)
		{
		unsigned int kk;
@@ -1089,6 +1094,7 @@ int MAIN(int argc, char **argv)
				dsa_doit[j]=0;
			}
		}
	if (rnd_fake) RAND_cleanup();
#endif

	fprintf(stdout,"%s\n",SSLeay_version(SSLEAY_VERSION));
+2 −0
Original line number Diff line number Diff line
@@ -146,3 +146,5 @@ DSA *get_dsa2048()
	return(dsa);
	}

static const char rnd_seed[] = "string to make the random number generator think it has entropy";
static int rnd_fake = 0;