if RAND is unhappy, don't run the tests.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19856 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2007-01-11 20:37:59 +00:00
parent 5fdf640ff5
commit 2bbb877357
2 changed files with 6 additions and 0 deletions

View File

@@ -189,6 +189,9 @@ main(int argc, char **argv)
printf(" %s", ENGINE_get_DH(engine)->name);
printf("\n");
if (RAND_status() != 1)
errx(77, "no functional random device, can't execute tests");
if (rsa_flag && have_rsa) {
unsigned char buf[1024 * 4];
const unsigned char *p;

View File

@@ -229,6 +229,9 @@ main(int argc, char **argv)
printf("rsa %s\n", ENGINE_get_RSA(engine)->name);
if (RAND_status() != 1)
errx(77, "no functional random device, refusing to run tests");
if (time_keygen) {
struct timeval tv1, tv2;
const int num = 10;