progName = PL_strdup(argv[0]);
progName = PORT_Strdup(argv[0]);
main(int argc, char **argv){	char *               certDir = NULL;	char *               progName     = NULL;	int                  connections  = 1;	char *               cipherString = NULL;	SECStatus            secStatus;	PLOptState *         optstate;	PLOptStatus          status;	/* Call the NSPR initialization routines */	PR_Init( PR_SYSTEM_THREAD, PR_PRIORITY_NORMAL, 1);	progName = PL_strdup(argv[0]);	hostName = NULL;	optstate = PL_CreateOptState(argc, argv, "C:c:d:n:p:w:");	while ((status = PL_GetNextOpt(optstate)) == PL_OPT_OK) {		switch(optstate->option) {		case 'C' : cipherString = PL_strdup(optstate->value); break;		case 'c' : connections = PORT_Atoi(optstate->value);  break;		case 'd' : certDir = PL_strdup(optstate->value);      break;		case 'p' : port = PORT_Atoi(optstate->value);         break;		case 'w' : password = PL_strdup(optstate->value);      break;		case '\0': hostName = PL_strdup(optstate->value);     break;		default  : Usage(progName);		}	}	if (port == 0) {		port = 443;	}	if (port == 0 || hostName == NULL)		Usage(progName);	/* Set our password function callback. */	PK11_SetPasswordFunc(myPasswd);	/* Initialize the NSS libraries. */	if (certDir) {	    secStatus = NSS_Init(certDir);	} else {	    secStatus = NSS_NoDB_Init(NULL);	    /* load the builtins */	    SECMOD_AddNewModule("Builtins",				DLL_PREFIX"nssckbi."DLL_SUFFIX, 0, 0);	}	if (secStatus != SECSuccess) {		exitErr("NSS_Init");	}	/* All cipher suites except RSA_NULL_MD5 are enabled by 	 * Domestic Policy. */	NSS_SetDomesticPolicy();	SSL_CipherPrefSetDefault(SSL_RSA_WITH_NULL_MD5, PR_TRUE);	/* 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(progName);		cptr = islower(ndx) ? ssl3CipherSuites : ssl2CipherSuites;		for (ndx &= 0x1f; (cipher = *cptr++) != 0 && --ndx > 0; )		    /* do nothing */;		if (cipher) {		    SSL_CipherPrefSetDefault(cipher, PR_TRUE);		}	    }	}	client_main(port, connections, hostName);	NSS_Shutdown();	PR_Cleanup();	return 0;}