Commit 4fb40db9 authored by Bodo Möller's avatar Bodo Möller
Browse files

Don't ever set 'seeded' if RAND_status() returned 0

(although maybe this static variable should be abolished totally,
it was introduced before RAND_status existed).
parent 9dd04638
Loading
Loading
Loading
Loading
+10 −7
Original line number Diff line number Diff line
@@ -142,7 +142,9 @@ int app_RAND_load_file(const char *file, BIO *bio_e, int dont_warn)
		}
	if (file == NULL || !RAND_load_file(file, -1))
		{
		if (RAND_status() == 0 && !dont_warn)
		if (RAND_status() == 0)
			{
			if (!dont_warn)
				{
				BIO_printf(bio_e,"unable to load 'random state'\n");
				BIO_printf(bio_e,"This means that the random number generator has not been seeded\n");
@@ -152,6 +154,7 @@ int app_RAND_load_file(const char *file, BIO *bio_e, int dont_warn)
					BIO_printf(bio_e,"Consider setting the RANDFILE environment variable to point at a file that\n");
					BIO_printf(bio_e,"'random' data can be kept in (the file will be overwritten).\n");
					}
				}
			return 0;
			}
		}