add "randomness"
[openssl.git] / crypto / dh / dhtest.c
index dbdb9638283ce6627deb38beaa9b8f6a55d6c822..1346f98f839c101482e3e2db58e64833fae782ff 100644 (file)
@@ -87,6 +87,8 @@ static void MS_CALLBACK cb(int p, int n, void *arg);
 #include "bss_file.c"
 #endif
 
 #include "bss_file.c"
 #endif
 
+static const char rnd_seed[] = "string to make the random number generator think it has entropy";
+
 int main(int argc, char *argv[])
        {
        DH *a;
 int main(int argc, char *argv[])
        {
        DH *a;
@@ -100,6 +102,8 @@ int main(int argc, char *argv[])
        CRYPTO_malloc_init();
 #endif
 
        CRYPTO_malloc_init();
 #endif
 
+       RAND_seed(rnd_seed, sizeof rnd_seed);
+
        out=BIO_new(BIO_s_file());
        if (out == NULL) exit(1);
        BIO_set_fp(out,stdout,BIO_NOCLOSE);
        out=BIO_new(BIO_s_file());
        if (out == NULL) exit(1);
        BIO_set_fp(out,stdout,BIO_NOCLOSE);