summaryrefslogtreecommitdiff
path: root/ssh-rand-helper.c
diff options
context:
space:
mode:
authordjm <djm>2002-01-22 10:58:27 +0000
committerdjm <djm>2002-01-22 10:58:27 +0000
commita10a497df66512553ceb3def62a233ae4779b72f (patch)
treeb1b03e1dd12ba769a149269afa28e23b53ff6480 /ssh-rand-helper.c
parentd49ae7c410f65f02109ffdabae87d353e1c4e361 (diff)
downloadopenssh-a10a497df66512553ceb3def62a233ae4779b72f.tar.gz
- (djm) Fix some bugs I introduced into ssh-rand-helper yesterday
Diffstat (limited to 'ssh-rand-helper.c')
-rw-r--r--ssh-rand-helper.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/ssh-rand-helper.c b/ssh-rand-helper.c
index 596622b4..3aab6667 100644
--- a/ssh-rand-helper.c
+++ b/ssh-rand-helper.c
@@ -39,7 +39,7 @@
#include "pathnames.h"
#include "log.h"
-RCSID("$Id: ssh-rand-helper.c,v 1.3 2002/01/21 12:44:12 djm Exp $");
+RCSID("$Id: ssh-rand-helper.c,v 1.4 2002/01/22 10:58:28 djm Exp $");
/* Number of bytes we write out */
#define OUTPUT_SEED_SIZE 48
@@ -83,9 +83,7 @@ char *__progname;
# define RUSAGE_CHILDREN 0
#endif
-#if defined(PRNGD_SOCKET) || defined(PRNGD_PORT)
-# define USE_PRNGD
-#else
+#if !defined(PRNGD_SOCKET) && !defined(PRNGD_PORT)
# define USE_SEED_FILES
#endif
@@ -774,13 +772,11 @@ main(int argc, char **argv)
(int)stir_from_system());
#ifdef PRNGD_PORT
- if (get_random_bytes_prngd(buf, sizeof(buf), PRNGD_PORT,
- NULL) == -1)
+ if (get_random_bytes_prngd(buf, sizeof(buf), PRNGD_PORT, NULL) == -1)
fatal("Entropy collection failed");
RAND_add(buf, sizeof(buf), sizeof(buf));
-#elif PRNGD_SOCKET
- if (get_random_bytes_prngd(buf, sizeof(buf), PRNGD_SOCKET,
- NULL) == -1)
+#elif defined(PRNGD_SOCKET)
+ if (get_random_bytes_prngd(buf, sizeof(buf), 0, PRNGD_SOCKET) == -1)
fatal("Entropy collection failed");
RAND_add(buf, sizeof(buf), sizeof(buf));
#else