From 5ef67042f9d3514d663b3f6a83aefc98a3cfa85d Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Tue, 10 Oct 2000 15:08:30 +0000 Subject: [PATCH] Do a favor to those who get weird compiles and report if RAND_pseudo_bytes returns -1... --- crypto/rand/randtest.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/crypto/rand/randtest.c b/crypto/rand/randtest.c index da96e3f695..b64de616db 100644 --- a/crypto/rand/randtest.c +++ b/crypto/rand/randtest.c @@ -73,7 +73,13 @@ int main() /*double d; */ long d; - RAND_pseudo_bytes(buf,2500); + i = RAND_pseudo_bytes(buf,2500); + if (i < 0) + { + printf ("init failed, the rand method is not properly installed\n"); + err++; + goto err; + } n1=0; for (i=0; i<16; i++) n2[i]=0; @@ -201,6 +207,7 @@ int main() err++; } printf("test 4 done\n"); + err: err=((err)?1:0); exit(err); return(err); -- 2.25.1