- return 0; /* Valid args */
-}
-
-/***********************************************************************
- * TIME - time functions
- */
-#define START 0
-#define STOP 1
-
-static double tm_Time_F(int s)
- {
- static double ret;
-#ifdef TIMES
- static struct tms tstart,tend;
-
- if(s == START) {
- times(&tstart);
- return(0);
- } else {
- times(&tend);
- ret=((double)(tend.tms_utime-tstart.tms_utime))/HZ;
- return((ret == 0.0)?1e-6:ret);
- }
-#else /* !times() */
- static struct timeb tstart,tend;
- long i;
-
- if(s == START) {
- ftime(&tstart);
- return(0);
- } else {
- ftime(&tend);
- i=(long)tend.millitm-(long)tstart.millitm;
- ret=((double)(tend.time-tstart.time))+((double)i)/1000.0;
- return((ret == 0.0)?1e-6:ret);
- }
-#endif
-}
-
-/***********************************************************************
- * MAIN - main processing area for client
- * real name depends on MONOLITH
- */
-int MAIN(int, char **);
-
-int MAIN(int argc, char **argv)
- {
- double totalTime = 0.0;
- int nConn = 0;
- SSL *scon=NULL;
- long finishtime=0;
- int ret=1,i;
- MS_STATIC char buf[1024*8];
- int ver;
-
- apps_startup();
- s_time_init();
-
- if (bio_err == NULL)
- bio_err=BIO_new_fp(stderr,BIO_NOCLOSE);
-
-#if !defined(OPENSSL_NO_SSL2) && !defined(OPENSSL_NO_SSL3)
- s_time_meth=SSLv23_client_method();
-#elif !defined(OPENSSL_NO_SSL3)
- s_time_meth=SSLv3_client_method();
-#elif !defined(OPENSSL_NO_SSL2)
- s_time_meth=SSLv2_client_method();
-#endif
-
- /* parse the command line arguments */
- if( parseArgs( argc, argv ) < 0 )
- goto end;
-
- OpenSSL_add_ssl_algorithms();
- if ((tm_ctx=SSL_CTX_new(s_time_meth)) == NULL) return(1);
-
- SSL_CTX_set_quiet_shutdown(tm_ctx,1);
-
- if (st_bugs) SSL_CTX_set_options(tm_ctx,SSL_OP_ALL);
- SSL_CTX_set_cipher_list(tm_ctx,tm_cipher);
- if(!set_cert_stuff(tm_ctx,t_cert_file,t_key_file))
- goto end;
-
- SSL_load_error_strings();
-
- if ((!SSL_CTX_load_verify_locations(tm_ctx,CAfile,CApath)) ||
- (!SSL_CTX_set_default_verify_paths(tm_ctx)))
- {
- /* BIO_printf(bio_err,"error setting default verify locations\n"); */
- ERR_print_errors(bio_err);
- /* goto end; */
- }
-
- if (tm_cipher == NULL)
- tm_cipher = getenv("SSL_CIPHER");
-
- if (tm_cipher == NULL ) {
- fprintf( stderr, "No CIPHER specified\n" );
-/* EXIT(1); */
- }