diff -urN WebStone2.5.orig/bin/runbench WebStone2.5/bin/runbench
--- WebStone2.5.orig/bin/runbench	Mon Jul 27 00:59:06 1998
+++ WebStone2.5/bin/runbench	Tue Jun  8 19:10:02 1999
@@ -220,6 +220,8 @@
 		[ -n "$PROXYSERVER" ] && CMD=$CMD" -P $PROXYSERVER"
 		[ -n "$DEBUG" ] && CMD=$CMD" -d -D $DEBUGFILE"
 		[ "$FIXED_RANDOM_SEED" = "true" ] && CMD="$CMD -S"
+		# SSL support 
+		[ "$USE_SSL" = "true" ] && CMD="$CMD -Z"
 		echo $CMD
 
 		# dump environment into $LOGDIR
diff -urN WebStone2.5.orig/conf/testbed WebStone2.5/conf/testbed
--- WebStone2.5.orig/conf/testbed	Fri Sep 18 16:27:49 1998
+++ WebStone2.5/conf/testbed	Tue Jun  8 21:45:39 1999
@@ -39,12 +39,14 @@
 # This is the host name or IP number of the web server that we will be
 # testing.  If you use a host name then be sure your client machines
 # can resolve that name.
-SERVER="calvin"
+SERVER="reddwarf"
 
 
 # Port 80 is the default web server port.  If your web server is running
 # on another port then you can change this value.
-PORTNO=80
+PORTNO=443
+#PORTNO=80
+USE_SSL=true
 
 
 # RCP is the command used to copy a file to and from one of the client 
@@ -55,8 +57,8 @@
 # empty then WebStone won't attempt to distribute the webclient binary
 # and filelist to the clients and you will have to do it by hand before 
 # running WebStone.
-RCP=rcp
-RSH=rsh
+RCP=scp
+RSH=ssh
 
 
 # When WebStone starts running it will try to connect to the web server
diff -urN WebStone2.5.orig/src/bench.h WebStone2.5/src/bench.h
--- WebStone2.5.orig/src/bench.h	Sat Jul 25 00:50:18 1998
+++ WebStone2.5/src/bench.h	Tue Jun  8 18:35:57 1999
@@ -29,6 +29,8 @@
 #include <stdio.h>
 #include <stdarg.h>
 
+#include <openssl/ssl.h>
+
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif	/* HAVE_UNISTD_H */
@@ -316,6 +318,9 @@
 extern int	timeexpired;
 extern long int number_of_pages;
 
+/* SMB */
+extern int	use_ssl;
+
 /* routines in bench.c */
 
 extern void *mymalloc(size_t size);
@@ -333,7 +338,9 @@
 
 /* routines in get.c */
 
-extern int  get(char *loc, NETPORT port, char *url, rqst_timer_t *timer);
+// extern int  get(char *loc, NETPORT port, char *url, rqst_timer_t *timer);
+/* SMB */
+extern int      get(char *loc, NETPORT port, char *url, rqst_timer_t *timer, SSL_CTX * ctx );
 
 /* routines in parse_file_list.c */
 
diff -urN WebStone2.5.orig/src/get.c WebStone2.5/src/get.c
--- WebStone2.5.orig/src/get.c	Sat Jul 25 00:50:16 1998
+++ WebStone2.5/src/get.c	Tue Jun  8 18:48:07 1999
@@ -52,6 +52,10 @@
 #include <winsock.h>
 #endif /* WIN32 */
 
+/* SMB */
+#include <openssl/ssl.h>
+/* /SMB */
+
 #include "sysdep.h"
 #include "bench.h"
 
@@ -79,7 +83,7 @@
 #endif /* HAVE_STRNCASECMP */
 
 int
-get(char *loc, NETPORT port, char *url, rqst_timer_t *timer)
+get(char *loc, NETPORT port, char *url, rqst_timer_t *timer , SSL_CTX * ctx )
 {
     SOCKET	sock = BADSOCKET_VALUE;
     int		writelen;
@@ -97,6 +101,12 @@
     char	version[100];
     int		count;
 
+    /* SMB */
+    int 	err ;
+    SSL		* ssl ;
+    X509	* server_cert ;
+    /* /SMB */
+
 #ifdef ABORTIVE_CLOSE
 #error do not enable this option
     struct linger {
@@ -141,6 +151,27 @@
     }
 #endif /* ABORTIVE_CLOSE */
 
+    /* SMB */
+    if ( use_ssl )
+    {
+    	/* Time to do the SSL magic */
+    	D_PRINTF( "Setting up SSL magic\n" ) ;
+    	ssl = SSL_new ( ctx ) ;
+    	if ( !ssl )
+    		D_PRINTF( "Woah! SSL_new returned NULL!\n" ) ;
+    	D_PRINTF( "Are we hanging in SSL_new?\n" ) ;
+    	SSL_set_fd ( ssl , sock ) ;
+    	D_PRINTF( "How about SSL_set_fd?\n" ) ;
+    	err = SSL_connect ( ssl ) ;
+    	D_PRINTF( "Perhaps SSL_connect?\n" ) ;
+
+    	/* Okay, all this is optional debugging crap */
+    	D_PRINTF ( "SSL connection using %s\n" , SSL_get_cipher ( ssl ) ) ;
+
+    	/* Do I need to get the server's certificate? */
+    }
+    /* /SMB */
+
     if(GETTIMEOFDAY(&timer->afterconnect, &timer->afterconnectzone) != 0)
     {
 		NETCLOSE(sock);
@@ -155,7 +186,13 @@
     sprintf(getcommand, "GET %s HTTP/1.0\r\n%s", url, ACCEPT_COMMAND);
     D_PRINTF( "Writing to server: %s\n", getcommand );
     writelen = strlen(getcommand);
-    status = NETWRITE(sock, getcommand, writelen);
+    /* SMB */
+    if ( use_ssl )
+    	status = SSL_write ( ssl , getcommand, writelen);
+    else
+    	status = NETWRITE(sock, getcommand, writelen);
+    /* /SMB */
+
     if(status != writelen)
     {
 		returnerr("Error sending command line to server: %s\n", neterrstr());
@@ -181,8 +218,16 @@
 			goto error;	/* this won't really be counted as an error */
 
 		TRACE("get(): about to read header\n");
-        bytesread = NETREAD(sock, headerbuffer+totalbytesread, 
-							HEADERBUFSIZ-totalbytesread);
+
+	/* SMB */
+	if ( use_ssl )
+        	bytesread = SSL_read ( ssl , headerbuffer+totalbytesread , 
+					     HEADERBUFSIZ - totalbytesread ) ;
+	else
+        	bytesread = NETREAD(sock, headerbuffer+totalbytesread, 
+						HEADERBUFSIZ-totalbytesread);
+	/* /SMB */
+
         if (timeexpired)
 			goto error;	/* this won't really be counted as an error */
         if (bytesread < 0)
@@ -269,7 +314,12 @@
     do
     {
 		TRACE("get(): about to read body\n");
-		bytesread = NETREAD(sock, headerbuffer, HEADERBUFSIZ);
+		/* SMB */
+		if ( use_ssl )
+			bytesread = SSL_read (ssl , headerbuffer, HEADERBUFSIZ);
+		else
+			bytesread = NETREAD(sock, headerbuffer, HEADERBUFSIZ);
+		/* /SMB */
         if (timeexpired) 
 			goto error;	/* this won't really be counted as an error */
 
@@ -307,6 +357,14 @@
     if (outputfile != (FILE *)NULL)
         fclose(outputfile);
 
+    /* SMB */
+    if ( use_ssl )
+    {
+    	SSL_free ( ssl ) ;
+    	D_PRINTF( "Freeing individual ssl connection\n" ) ;
+    }
+    /* /SMB */
+
     D_PRINTF( "Read %d bytes, %d of that being body\n",
 				totalbytesread, bodylength );
 
@@ -337,6 +395,12 @@
 	TRACE("get(): entering error section\n");
     if (!BADSOCKET(sock))
         NETCLOSE(sock);
+
+    /* SMB */
+    if ( use_ssl && ssl )
+        SSL_free ( ssl ) ;
+    /* /SMB */
+
     if (outputfile != (FILE *)NULL)
 		fclose(outputfile);
     GETTIMEOFDAY(&timer->exittime, &timer->exittimezone);
diff -urN WebStone2.5.orig/src/get.h WebStone2.5/src/get.h
--- WebStone2.5.orig/src/get.h	Sat Jul 25 00:50:18 1998
+++ WebStone2.5/src/get.h	Sun Jun  6 17:58:12 1999
@@ -25,7 +25,9 @@
 #ifndef __GET_H__
 #define __GET_H__
 
+#include <openssl/ssl.h>
  
-extern int	get(char *loc, int port, char *url, rqst_timer_t *timer);
+// extern int	get(char *loc, int port, char *url, rqst_timer_t *timer);
+extern int	get(char *loc, int port, char *url, rqst_timer_t *timer, SSL_CTX * ctx );
 
 #endif /* !__GET_H__ */
diff -urN WebStone2.5.orig/src/savefile10549 WebStone2.5/src/savefile10549
diff -urN WebStone2.5.orig/src/webclient.c WebStone2.5/src/webclient.c
--- WebStone2.5.orig/src/webclient.c	Sat Jul 25 00:50:17 1998
+++ WebStone2.5/src/webclient.c	Tue Jun  8 18:42:59 1999
@@ -57,6 +57,10 @@
 #include "sysdep.h"
 #include "bench.h"
 
+/* SMB */
+#include <openssl/ssl.h>
+/* /SMB */
+
 #define _BSD_SIGNALS
 #define INFINITY	100000000
 #define DEFAULTWWWPORT	80
@@ -79,6 +83,9 @@
 char	proxyserver[MAXHOSTNAMELEN];
 char	debug_filename[MAXPATHLEN];
 
+/* SMB */
+int 	use_ssl = 0 ;
+
 THREAD FILE	*debugfile = stderr;
 THREAD FILE	*logfile;
 THREAD stats_t	timestat;
@@ -430,7 +437,7 @@
  * returns the number of files retrieved
  */
 static int 
-makeload(int maxcount, int pageval)
+makeload(int maxcount, int pageval , SSL_CTX * ctx )
 {
 	int cnt;
 	int returnval;
@@ -484,7 +491,11 @@
 
 		returnval = get(server, loc_portnum, 
 						load_file_list[pageval].filename[cnt],
-						&(timerarray[cnt]));
+						&(timerarray[cnt])
+		/* SMB */
+						, ctx 
+		/* /SMB */
+						);
 		if (returnval < 0)
 			D_PRINTF( "***GET() RETURNED AN ERROR\n" );
      
@@ -576,7 +587,8 @@
     extern int  optind;
 	int		i;
 
-	while((getoptch = getopt(argc,argv,"c:l:n:p:P:R:S:t:u:U:w:dD:sTv")) != EOF)
+	/* SMB */
+	while((getoptch = getopt(argc,argv,"c:l:n:p:P:R:S:t:u:U:w:dD:sTvZ")) != EOF)
 	{
 		switch(getoptch)
 		{
@@ -631,6 +643,11 @@
 		    havewebserver = 1;
 		    sprintf(webserver,"%s",optarg);
 		    break;
+		/* SMB */
+		case 'Z':
+		    use_ssl = 1 ;
+		    break ; 
+		/* /SMB */
 		default:
 		    usage(argv[0]);
 		}
@@ -947,6 +964,11 @@
 	int		returnval;
 	unsigned int my_random_seed;
 
+	/* SMB */
+	SSL_CTX 	* ctx ;
+	SSL_METHOD 	* meth ;
+	/* /SMB */
+
 	/*
 	 * INITIALIZE DATA
 	 */
@@ -976,6 +998,23 @@
 	}
 	TRACE("ClientThread(): starting\n");
 
+	/* SMB */
+	if ( use_ssl ) 
+	{
+		SSL_library_init ( ) ;
+		meth = SSLv3_client_method ( ) ;
+		SSL_load_error_strings ( ) ;
+		ctx = SSL_CTX_new ( meth ) ;
+
+		if ( !ctx )
+		{
+			D_PRINTF ( "Error setting up SSL context.\n" ) ;
+		}
+
+		D_PRINTF ( "Finished setting up SSL context.\n" ) ;
+	}
+	/* /SMB */
+	
 	if (record_all_transactions)
 	{
 		/* 
@@ -1090,7 +1129,7 @@
 
 				D_PRINTF( "Final page index %d\n", page_index );
 				filecnt = makeload(load_file_list[page_index].num_of_files,
-								   page_index);
+							page_index, ctx );
 			}
 			else /* NOT RUNNING IN TIMED MODE */
 			{
@@ -1099,7 +1138,7 @@
 							page_number++)
 				{
 					filecnt = makeload(load_file_list[page_number].num_of_files,
-									 	page_number);
+							page_number , ctx );
 
 				}
 			}
@@ -1111,7 +1150,7 @@
 		 	 * Passing -1 to makeload means get the entire set of files.
 			 */
 			D_PRINTF( "No filelist\n" );
-			filecnt = makeload(numfiles, -1);
+			filecnt = makeload(numfiles, -1, ctx );
 		}
 		if (filecnt > 0)
 			file_count += filecnt;
@@ -1273,6 +1312,14 @@
 	}
 
 end:
+	/* SMB */
+	if ( use_ssl )
+	{
+		SSL_CTX_free ( ctx ) ;
+		D_PRINTF( "Freeing SSL context.\n" );
+	}
+	/* /SMB */
+
 	if (record_all_transactions)
 		fclose(logfile);
 	if (DEBUGGING_ANY)
diff -urN WebStone2.5.orig/src/webmaster.c WebStone2.5/src/webmaster.c
--- WebStone2.5.orig/src/webmaster.c	Sat Jul 25 00:50:18 1998
+++ WebStone2.5/src/webmaster.c	Tue Jun  8 18:48:12 1999
@@ -80,6 +80,9 @@
 int		randomize = 0;
 fd_set	zerofdset;
 
+/* SMB */
+int 	use_ssl = 0 ;
+
 /* other key data */
 long int    number_of_pages = 0;
 long int    num_input_lines = 0;
@@ -364,7 +367,8 @@
     /* 
      * PARSE THE COMMAND LINE OPTIONS
      */
-	while((getoptch = getopt(argc,argv,"aC:dD:f:l:M:n:p:P:R:sSt:Tu:U:vw:WX"))
+	/* SMB */
+	while((getoptch = getopt(argc,argv,"aC:dD:f:l:M:n:p:P:R:sSt:Tu:U:vw:WXZ"))
 		!= EOF)
     {
 		switch(getoptch)
@@ -432,6 +436,11 @@
 			havewebserver = 1;
 			strcpy(webserver, optarg);
 			break;
+		/* SMB */
+		case 'Z':
+			use_ssl = 1 ;
+			break ;
+		/* /SMB */
 		default:
 			fprintf(stderr,"-%c: Flag not recognized\n", (char)getoptch);
 			usage(argv[0]);
@@ -674,6 +683,11 @@
 
     if (record_all_transactions)
 		strcat(commandline, " -R");
+
+    /* SMB */
+    if ( use_ssl )
+        strcat(commandline," -Z");
+    /* /SMB */
 
     if (testtime != 0)
     {
