diff options
Diffstat (limited to 'ssh-rand-helper.c')
-rw-r--r-- | ssh-rand-helper.c | 14 |
1 files changed, 5 insertions, 9 deletions
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 | ||
42 | RCSID("$Id: ssh-rand-helper.c,v 1.3 2002/01/21 12:44:12 djm Exp $"); | 42 | RCSID("$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 |