From f70c9c6ede4bfa2f5097bdd7b44d3c988c530089 Mon Sep 17 00:00:00 2001 From: hniksic Date: Tue, 4 Dec 2001 02:33:18 -0800 Subject: [PATCH] [svn] Windows update from Herold Heiko. --- ChangeLog | 6 ++++++ src/ChangeLog | 7 +++++++ src/gen_sslfunc.c | 7 +++++++ windows/Makefile.src | 4 ++-- windows/Makefile.src.bor | 1 + 5 files changed, 23 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index dba0049b..cd91db2e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2001-12-04 Herold Heiko + + * windows\Makefile.src: add gen_sslfunc.c + + * windows\Makefile.src.bor: ditto. + 2001-12-01 Hrvoje Niksic * po/hr.po: Updated Croatian translation. diff --git a/src/ChangeLog b/src/ChangeLog index 496f4623..6ad6e599 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2001-12-04 Herold Heiko + + * gen_sslfunc.c: on windows provide ssl crypto random + initialization through RAND_screen(); could possibly + be not enough for strong ssl communication (see the + relevant manual page from the openssl package). + 2001-12-04 Hrvoje Niksic * url.c (local_quote_string): Reenable quoting of question marks, diff --git a/src/gen_sslfunc.c b/src/gen_sslfunc.c index 5ef51050..f32e7d80 100644 --- a/src/gen_sslfunc.c +++ b/src/gen_sslfunc.c @@ -70,6 +70,7 @@ ssl_init_prng (void) RAND_seed((unsigned char *)&t, sizeof(time_t)); /* Initialize system's random number generator */ RAND_bytes((unsigned char *)&seed, sizeof(long)); +#ifndef WINDOWS srand48(seed); while (RAND_status () == 0) { @@ -78,6 +79,12 @@ ssl_init_prng (void) l = lrand48(); RAND_seed((unsigned char *)&l, sizeof(long)); } +#else /* WINDOWS */ + RAND_screen(); + if (RAND_status() == 0) + /* Here we should probably disable the whole ssl protocol ? HEH */ + DEBUGP (("SSL random data generator not seeded correctly, %i",RAND_status())); +#endif /* WINDOWS */ if (rand_file != NULL) { /* Write a rand_file */ diff --git a/windows/Makefile.src b/windows/Makefile.src index 35c7c847..ab7cd5b5 100644 --- a/windows/Makefile.src +++ b/windows/Makefile.src @@ -55,12 +55,12 @@ RM = del SRC = cmpt.c safe-ctype.c connect.c host.c http.c netrc.c ftp-basic.c ftp.c \ ftp-ls.c ftp-opie.c getopt.c hash.c headers.c html-parse.c html-url.c \ progress.c retr.c recur.c res.c url.c cookies.c init.c utils.c main.c \ - version.c mswindows.c fnmatch.c gnu-md5.c rbuf.c log.c $(SSLSRC) + version.c mswindows.c fnmatch.c gen-md5.c gnu-md5.c rbuf.c log.c $(SSLSRC) OBJ = cmpt$o safe-ctype$o connect$o host$o http$o netrc$o ftp-basic$o ftp$o \ ftp-ls$o ftp-opie$o getopt$o hash$o headers$o html-parse$o html-url$o \ progress$o retr$o recur$o res$o url$o cookies$o init$o utils$o main$o \ - version$o mswindows$o fnmatch$o gnu-md5$o rbuf$o log$o $(SSLOBJ) + version$o mswindows$o fnmatch$o gen-md5$o gnu-md5$o rbuf$o log$o $(SSLOBJ) .SUFFIXES: .c .obj diff --git a/windows/Makefile.src.bor b/windows/Makefile.src.bor index 9608c30d..3bdb4cc2 100644 --- a/windows/Makefile.src.bor +++ b/windows/Makefile.src.bor @@ -32,6 +32,7 @@ progress.obj+ netrc.obj+ mswindows.obj+ gnu-md5.obj+ +gen-md5.obj+ main.obj+ log.obj+ init.obj+ -- 2.39.2