if (cipher) {
if (cipher > 0) {
client_main(    unsigned short      port,     int                 connections,    cert_and_key* Cert_And_Key,    const char *	hostName){    PRFileDesc *model_sock	= NULL;    int         i;    int         rv;    PRUint32	ipAddress;	/* in host byte order */    PRNetAddr   addr;    /* Assemble NetAddr struct for connections. */    ipAddress = getIPAddress(hostName);    addr.inet.family = PR_AF_INET;    addr.inet.port   = PR_htons(port);    addr.inet.ip     = PR_htonl(ipAddress);    /* all suites except RSA_NULL_MD5 are enabled by Domestic Policy */    NSS_SetDomesticPolicy();    /* all the SSL2 and SSL3 cipher suites are enabled by default. */    if (cipherString) {        int ndx;        /* disable all the ciphers, then enable the ones we want. */        disableAllSSLCiphers();        while (0 != (ndx = *cipherString++)) {            int *cptr;            int  cipher;            if (! isalpha(ndx))                Usage("strsclnt");            cptr = islower(ndx) ? ssl3CipherSuites : ssl2CipherSuites;            for (ndx &= 0x1f; (cipher = *cptr++) != 0 && --ndx > 0; )                /* do nothing */;            if (cipher) {		SECStatus rv;                rv = SSL_CipherPrefSetDefault(cipher, PR_TRUE);		if (rv != SECSuccess) {		    fprintf(stderr, 		"strsclnt: SSL_CipherPrefSetDefault failed with value 0x%04x\n",			    cipher);		    exit(1);		}            }        }    }    /* configure model SSL socket. */    model_sock = PR_NewTCPSocket();    if (model_sock == NULL) {	errExit("PR_NewTCPSocket on model socket");    }    model_sock = SSL_ImportFD(NULL, model_sock);    if (model_sock == NULL) {	errExit("SSL_ImportFD");    }    /* do SSL configuration. */    rv = SSL_OptionSet(model_sock, SSL_SECURITY, 1);    if (rv < 0) {	errExit("SSL_OptionSet SSL_SECURITY");    }    rv = SSL_OptionSet(model_sock, SSL_ENABLE_SSL3, !disableSSL3);    if (rv != SECSuccess) {	errExit("error enabling SSLv3 ");    }    rv = SSL_OptionSet(model_sock, SSL_ENABLE_TLS, !disableTLS);    if (rv != SECSuccess) {	errExit("error enabling TLS ");    }    if (bigBuf.data) { /* doing FDX */	rv = SSL_OptionSet(model_sock, SSL_ENABLE_FDX, 1);	if (rv < 0) {	    errExit("SSL_OptionSet SSL_ENABLE_FDX");	}    }    if (NoReuse) {	rv = SSL_OptionSet(model_sock, SSL_NO_CACHE, 1);	if (rv < 0) {	    errExit("SSL_OptionSet SSL_NO_CACHE");	}    }    SSL_SetURL(model_sock, hostName);    SSL_AuthCertificateHook(model_sock, mySSLAuthCertificate, 			(void *)CERT_GetDefaultCertDB());    SSL_BadCertHook(model_sock, myBadCertHandler, NULL);    SSL_GetClientAuthDataHook(model_sock, StressClient_GetClientAuthData, (void*)Cert_And_Key);    /* I'm not going to set the HandshakeCallback function. */    /* end of ssl configuration. */    init_thread_data();    remaining_connections = total_connections = connections;    total_connections_modulo_100 = total_connections % 100;    total_connections_rounded_down_to_hundreds =        total_connections - total_connections_modulo_100;    if (!NoReuse) {        remaining_connections = 1;	rv = launch_thread(do_connects, &addr, model_sock, 0);	/* wait for the first connection to terminate, then launch the rest. */	reap_threads();        remaining_connections = total_connections - 1 ;    }    if (remaining_connections > 0) {        active_threads  = PR_MIN(active_threads, remaining_connections);	/* Start up the threads */	for (i=0;i<active_threads;i++) {	    rv = launch_thread(do_connects, &addr, model_sock, i);	}	reap_threads();    }    destroy_thread_data();    PR_Close(model_sock);}