summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Steves <stevesk@pobox.com>2002-07-28 20:42:23 +0000
committerKevin Steves <stevesk@pobox.com>2002-07-28 20:42:23 +0000
commit4bdb547ff4dd4625831dea1fdb6c479703ddf48e (patch)
tree8fb7c9ecac177fc9318003968b258cc927b582c5
parente7dbdf7ff82fb11d3ebc2863a5896106dd63880e (diff)
- (stevesk) [ssh-rand-helper.c] RAND_bytes() and SHA1_Final() unsigned
char arg.
-rw-r--r--ChangeLog4
-rw-r--r--ssh-rand-helper.c13
2 files changed, 9 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 0a4b50d49..bfaa29d89 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,8 @@
120020728 120020728
2 - (stevesk) [auth-pam.c] should use PAM_MSG_MEMBER(); from solar 2 - (stevesk) [auth-pam.c] should use PAM_MSG_MEMBER(); from solar
3 - (stevesk) [CREDITS] solar 3 - (stevesk) [CREDITS] solar
4 - (stevesk) [ssh-rand-helper.c] RAND_bytes() and SHA1_Final() unsigned
5 char arg.
4 6
520020725 720020725
6 - (djm) Remove some cruft from INSTALL 8 - (djm) Remove some cruft from INSTALL
@@ -1460,4 +1462,4 @@
1460 - (stevesk) entropy.c: typo in debug message 1462 - (stevesk) entropy.c: typo in debug message
1461 - (djm) ssh-keygen -i needs seeded RNG; report from markus@ 1463 - (djm) ssh-keygen -i needs seeded RNG; report from markus@
1462 1464
1463$Id: ChangeLog,v 1.2407 2002/07/28 20:31:18 stevesk Exp $ 1465$Id: ChangeLog,v 1.2408 2002/07/28 20:42:23 stevesk Exp $
diff --git a/ssh-rand-helper.c b/ssh-rand-helper.c
index 364d5d270..e6c52b546 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.7 2002/06/09 19:41:49 mouring Exp $"); 42RCSID("$Id: ssh-rand-helper.c,v 1.8 2002/07/28 20:42:24 stevesk 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
@@ -63,7 +63,6 @@ RCSID("$Id: ssh-rand-helper.c,v 1.7 2002/06/09 19:41:49 mouring Exp $");
63# define SSH_PRNG_COMMAND_FILE SSHDIR "/ssh_prng_cmds" 63# define SSH_PRNG_COMMAND_FILE SSHDIR "/ssh_prng_cmds"
64#endif 64#endif
65 65
66
67#ifdef HAVE___PROGNAME 66#ifdef HAVE___PROGNAME
68extern char *__progname; 67extern char *__progname;
69#else 68#else
@@ -115,7 +114,7 @@ double stir_from_programs(void);
115double stir_gettimeofday(double entropy_estimate); 114double stir_gettimeofday(double entropy_estimate);
116double stir_clock(double entropy_estimate); 115double stir_clock(double entropy_estimate);
117double stir_rusage(int who, double entropy_estimate); 116double stir_rusage(int who, double entropy_estimate);
118double hash_command_output(entropy_cmd_t *src, char *hash); 117double hash_command_output(entropy_cmd_t *src, unsigned char *hash);
119int get_random_bytes_prngd(unsigned char *buf, int len, 118int get_random_bytes_prngd(unsigned char *buf, int len,
120 unsigned short tcp_port, char *socket_path); 119 unsigned short tcp_port, char *socket_path);
121 120
@@ -274,7 +273,7 @@ timeval_diff(struct timeval *t1, struct timeval *t2)
274} 273}
275 274
276double 275double
277hash_command_output(entropy_cmd_t *src, char *hash) 276hash_command_output(entropy_cmd_t *src, unsigned char *hash)
278{ 277{
279 char buf[8192]; 278 char buf[8192];
280 fd_set rdset; 279 fd_set rdset;
@@ -460,7 +459,7 @@ stir_from_programs(void)
460{ 459{
461 int c; 460 int c;
462 double entropy, total_entropy; 461 double entropy, total_entropy;
463 char hash[SHA_DIGEST_LENGTH]; 462 unsigned char hash[SHA_DIGEST_LENGTH];
464 463
465 total_entropy = 0; 464 total_entropy = 0;
466 for(c = 0; entropy_cmds[c].path != NULL; c++) { 465 for(c = 0; entropy_cmds[c].path != NULL; c++) {
@@ -543,7 +542,8 @@ void
543prng_write_seedfile(void) 542prng_write_seedfile(void)
544{ 543{
545 int fd; 544 int fd;
546 char seed[SEED_FILE_SIZE], filename[MAXPATHLEN]; 545 unsigned char seed[SEED_FILE_SIZE];
546 char filename[MAXPATHLEN];
547 struct passwd *pw; 547 struct passwd *pw;
548 548
549 pw = getpwuid(getuid()); 549 pw = getpwuid(getuid());
@@ -862,4 +862,3 @@ main(int argc, char **argv)
862 862
863 return ret == bytes ? 0 : 1; 863 return ret == bytes ? 0 : 1;
864} 864}
865