summaryrefslogtreecommitdiff
path: root/ssh-rand-helper.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2002-01-22 21:58:27 +1100
committerDamien Miller <djm@mindrot.org>2002-01-22 21:58:27 +1100
commitc46cc5445dd9848c57318b3eb4fb7ca6a554839c (patch)
treee77e82e31fbdda48fc3a1658048585b99f564406 /ssh-rand-helper.c
parent6c21c51c487ec31ceb5b81b536c9516c5f20b5b0 (diff)
- (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