- (stevesk) [ssh-rand-helper.c] RAND_bytes() and SHA1_Final() unsigned

char arg.
This commit is contained in:
Kevin Steves 2002-07-28 20:42:23 +00:00
parent e7dbdf7ff8
commit 4bdb547ff4
2 changed files with 9 additions and 8 deletions

View File

@ -1,6 +1,8 @@
20020728 20020728
- (stevesk) [auth-pam.c] should use PAM_MSG_MEMBER(); from solar - (stevesk) [auth-pam.c] should use PAM_MSG_MEMBER(); from solar
- (stevesk) [CREDITS] solar - (stevesk) [CREDITS] solar
- (stevesk) [ssh-rand-helper.c] RAND_bytes() and SHA1_Final() unsigned
char arg.
20020725 20020725
- (djm) Remove some cruft from INSTALL - (djm) Remove some cruft from INSTALL
@ -1460,4 +1462,4 @@
- (stevesk) entropy.c: typo in debug message - (stevesk) entropy.c: typo in debug message
- (djm) ssh-keygen -i needs seeded RNG; report from markus@ - (djm) ssh-keygen -i needs seeded RNG; report from markus@
$Id: ChangeLog,v 1.2407 2002/07/28 20:31:18 stevesk Exp $ $Id: ChangeLog,v 1.2408 2002/07/28 20:42:23 stevesk Exp $

View File

@ -39,7 +39,7 @@
#include "pathnames.h" #include "pathnames.h"
#include "log.h" #include "log.h"
RCSID("$Id: ssh-rand-helper.c,v 1.7 2002/06/09 19:41:49 mouring Exp $"); RCSID("$Id: ssh-rand-helper.c,v 1.8 2002/07/28 20:42:24 stevesk Exp $");
/* Number of bytes we write out */ /* Number of bytes we write out */
#define OUTPUT_SEED_SIZE 48 #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 $");
# define SSH_PRNG_COMMAND_FILE SSHDIR "/ssh_prng_cmds" # define SSH_PRNG_COMMAND_FILE SSHDIR "/ssh_prng_cmds"
#endif #endif
#ifdef HAVE___PROGNAME #ifdef HAVE___PROGNAME
extern char *__progname; extern char *__progname;
#else #else
@ -115,7 +114,7 @@ double stir_from_programs(void);
double stir_gettimeofday(double entropy_estimate); double stir_gettimeofday(double entropy_estimate);
double stir_clock(double entropy_estimate); double stir_clock(double entropy_estimate);
double stir_rusage(int who, double entropy_estimate); double stir_rusage(int who, double entropy_estimate);
double hash_command_output(entropy_cmd_t *src, char *hash); double hash_command_output(entropy_cmd_t *src, unsigned char *hash);
int get_random_bytes_prngd(unsigned char *buf, int len, int get_random_bytes_prngd(unsigned char *buf, int len,
unsigned short tcp_port, char *socket_path); unsigned short tcp_port, char *socket_path);
@ -274,7 +273,7 @@ timeval_diff(struct timeval *t1, struct timeval *t2)
} }
double double
hash_command_output(entropy_cmd_t *src, char *hash) hash_command_output(entropy_cmd_t *src, unsigned char *hash)
{ {
char buf[8192]; char buf[8192];
fd_set rdset; fd_set rdset;
@ -460,7 +459,7 @@ stir_from_programs(void)
{ {
int c; int c;
double entropy, total_entropy; double entropy, total_entropy;
char hash[SHA_DIGEST_LENGTH]; unsigned char hash[SHA_DIGEST_LENGTH];
total_entropy = 0; total_entropy = 0;
for(c = 0; entropy_cmds[c].path != NULL; c++) { for(c = 0; entropy_cmds[c].path != NULL; c++) {
@ -543,7 +542,8 @@ void
prng_write_seedfile(void) prng_write_seedfile(void)
{ {
int fd; int fd;
char seed[SEED_FILE_SIZE], filename[MAXPATHLEN]; unsigned char seed[SEED_FILE_SIZE];
char filename[MAXPATHLEN];
struct passwd *pw; struct passwd *pw;
pw = getpwuid(getuid()); pw = getpwuid(getuid());
@ -862,4 +862,3 @@ main(int argc, char **argv)
return ret == bytes ? 0 : 1; return ret == bytes ? 0 : 1;
} }