Index: gen_sslfunc.c
===================================================================
RCS file: /pack/anoncvs/wget/src/gen_sslfunc.c,v
retrieving revision 1.8
diff -u -r1.8 gen_sslfunc.c
--- gen_sslfunc.c	2001/11/29 18:22:18	1.8
+++ gen_sslfunc.c	2001/11/29 20:57:11
@@ -53,11 +53,13 @@
     {
       char rand_file[256];
       time_t t;
-      pid_t pid;
       long l,seed;
 
       t = time(NULL);
-      pid = getpid();
+      /* gets random data from egd if opt.sslegdsock was set */
+      if (opt.sslegdsock != NULL)
+	RAND_egd(opt.sslegdsock);
+      /* gets the file ~/.rnd or $RANDFILE if set */
       RAND_file_name(rand_file, 256);
       if (rand_file != NULL)
 	{
@@ -66,8 +68,6 @@
 	}
       /* Seed in time (mod_ssl does this) */
       RAND_seed((unsigned char *)&t, sizeof(time_t));
-      /* Seed in pid (mod_ssl does this) */
-      RAND_seed((unsigned char *)&pid, sizeof(pid_t));
       /* Initialize system's random number generator */
       RAND_bytes((unsigned char *)&seed, sizeof(long));
       srand48(seed);

Index: main.c
===================================================================
RCS file: /pack/anoncvs/wget/src/main.c,v
retrieving revision 1.61
diff -u -r1.61 main.c
--- main.c	2001/11/28 02:44:18	1.61
+++ main.c	2001/11/29 20:57:19
@@ -146,6 +146,7 @@
   -B,  --base=URL             prepends URL to relative links in -F -i file.\n\
        --sslcertfile=FILE     optional client certificate.\n\
        --sslcertkey=KEYFILE   optional keyfile for this certificate.\n\
+       --sslegdsock=FILE      socket to the egd daemon(random data source).\n\
 \n"), stdout);
   fputs (_("\
 Download:\n\
@@ -320,6 +321,7 @@
 #ifdef HAVE_SSL
     { "sslcertfile", required_argument, NULL, 158 },
     { "sslcertkey", required_argument, NULL, 159 },
+    { "sslegdsock", required_argument, NULL, 166 },
 #endif /* HAVE_SSL */
     { "wait", required_argument, NULL, 'w' },
     { "waitretry", required_argument, NULL, 152 },
@@ -539,6 +541,9 @@
 	  break;
 	case 159:
 	  setval ("sslcertkey", optarg);
+	  break;
+	case 166:
+	  setval ("sslegdsock", optarg);
 	  break;
 #endif /* HAVE_SSL */
 	case 'A':

Index: options.h
===================================================================
RCS file: /pack/anoncvs/wget/src/options.h,v
retrieving revision 1.23
diff -u -r1.23 options.h
--- options.h	2001/11/28 02:44:18	1.23
+++ options.h	2001/11/29 20:57:36
@@ -160,6 +160,7 @@
   char *sslcertkey;		/* the keyfile for this certificate
 				   (if not internal) included in the
 				   certfile. */
+  char *sslegdsock;             /* optional socket of the egd daemon */
 #endif /* HAVE_SSL */
 
   int   cookies;

Index: init.c
===================================================================
RCS file: /pack/anoncvs/wget/src/init.c,v
retrieving revision 1.40
diff -u -r1.40 init.c
--- init.c	2001/11/28 02:44:18	1.40
+++ init.c	2001/11/29 20:57:45
@@ -179,6 +179,7 @@
 #ifdef HAVE_SSL
   { "sslcertfile",	&opt.sslcertfile,	cmd_file },
   { "sslcertkey",	&opt.sslcertkey,	cmd_file },
+  { "sslegdsock",	&opt.sslegdsock,	cmd_file },
 #endif /* HAVE_SSL */
   { "timeout",		&opt.timeout,		cmd_time },
   { "timestamping",	&opt.timestamping,	cmd_boolean },














