X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=apps%2Fapp_rand.c;h=1146f9f7f38ad986a38296cc68567569a41dafe6;hp=ea35bf9b1d712ae5687b51314e774379c671efd6;hb=e73a6965e374270971d730f5886b6ecc214e609f;hpb=4ec2d4d2b3a8cba1fdc656acd6b19d003191d779 diff --git a/apps/app_rand.c b/apps/app_rand.c index ea35bf9b1d..1146f9f7f3 100644 --- a/apps/app_rand.c +++ b/apps/app_rand.c @@ -56,7 +56,7 @@ * [including the GNU Public Licence.] */ /* ==================================================================== - * Copyright (c) 1998-1999 The OpenSSL Project. All rights reserved. + * Copyright (c) 1998-2000 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -109,7 +109,9 @@ * */ +#define NON_MAIN #include "apps.h" +#undef NON_MAIN #include #include @@ -162,7 +164,8 @@ long app_RAND_load_files(char *name) char *p,*n; int last; long tot=0; - + int egd; + for (;;) { last=0; @@ -173,8 +176,9 @@ long app_RAND_load_files(char *name) name=p+1; if (*n == '\0') break; - tot+=RAND_egd(n); - tot+=RAND_load_file(n,1024L*1024L); + egd=RAND_egd(n); + if (egd > 0) tot+=egd; + tot+=RAND_load_file(n,-1); if (last) break; } if (tot > 512)