summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--ssh-rand-helper.c14
2 files changed, 7 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 7b58218cb..a162d2913 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,7 @@
6 the ssh-rand-helper program. You can force the use of ssh-rand-helper 6 the ssh-rand-helper program. You can force the use of ssh-rand-helper
7 using the --with-rand-helper configure argument 7 using the --with-rand-helper configure argument
8 - Simplify and clean up ssh-rand-helper configuration 8 - Simplify and clean up ssh-rand-helper configuration
9 - (djm) Fix some bugs I introduced into ssh-rand-helper yesterday
9 10
1020020121 1120020121
11 - (djm) Rework ssh-rand-helper: 12 - (djm) Rework ssh-rand-helper:
@@ -7153,4 +7154,4 @@
7153 - Wrote replacements for strlcpy and mkdtemp 7154 - Wrote replacements for strlcpy and mkdtemp
7154 - Released 1.0pre1 7155 - Released 1.0pre1
7155 7156
7156$Id: ChangeLog,v 1.1722 2002/01/22 10:57:53 djm Exp $ 7157$Id: ChangeLog,v 1.1723 2002/01/22 10:58:27 djm Exp $
diff --git a/ssh-rand-helper.c b/ssh-rand-helper.c
index 596622b42..3aab6667e 100644
--- a/ssh-rand-helper.c
+++ b/ssh-rand-helper.c
@@ -39,7 +39,7 @@
39#include "pathnames.h" 39#include "pathnames.h"
40#include "log.h" 40#include "log.h"
41 41
42RCSID("$Id: ssh-rand-helper.c,v 1.3 2002/01/21 12:44:12 djm Exp $"); 42RCSID("$Id: ssh-rand-helper.c,v 1.4 2002/01/22 10:58:28 djm Exp $");
43 43
44/* Number of bytes we write out */ 44/* Number of bytes we write out */
45#define OUTPUT_SEED_SIZE 48 45#define OUTPUT_SEED_SIZE 48
@@ -83,9 +83,7 @@ char *__progname;
83# define RUSAGE_CHILDREN 0 83# define RUSAGE_CHILDREN 0
84#endif 84#endif
85 85
86#if defined(PRNGD_SOCKET) || defined(PRNGD_PORT) 86#if !defined(PRNGD_SOCKET) && !defined(PRNGD_PORT)
87# define USE_PRNGD
88#else
89# define USE_SEED_FILES 87# define USE_SEED_FILES
90#endif 88#endif
91 89
@@ -774,13 +772,11 @@ main(int argc, char **argv)
774 (int)stir_from_system()); 772 (int)stir_from_system());
775 773
776#ifdef PRNGD_PORT 774#ifdef PRNGD_PORT
777 if (get_random_bytes_prngd(buf, sizeof(buf), PRNGD_PORT, 775 if (get_random_bytes_prngd(buf, sizeof(buf), PRNGD_PORT, NULL) == -1)
778 NULL) == -1)
779 fatal("Entropy collection failed"); 776 fatal("Entropy collection failed");
780 RAND_add(buf, sizeof(buf), sizeof(buf)); 777 RAND_add(buf, sizeof(buf), sizeof(buf));
781#elif PRNGD_SOCKET 778#elif defined(PRNGD_SOCKET)
782 if (get_random_bytes_prngd(buf, sizeof(buf), PRNGD_SOCKET, 779 if (get_random_bytes_prngd(buf, sizeof(buf), 0, PRNGD_SOCKET) == -1)
783 NULL) == -1)
784 fatal("Entropy collection failed"); 780 fatal("Entropy collection failed");
785 RAND_add(buf, sizeof(buf), sizeof(buf)); 781 RAND_add(buf, sizeof(buf), sizeof(buf));
786#else 782#else