SECStatus rv;
SECStatus rv = SECSuccess;
dsa_test(blapitestInfo *info){	PQGParams *params;	PQGVerify *verify;	DSAPrivateKey *key;	SECStatus rv;	PRIntervalTime time1, time2;	int i, numiter;	numiter = info->repetitions;	fillitem(&info->in, info->bufsize, "tmp.pt");	if (info->key.len > 0) {		key = dsakey_from_filedata(&info->key);	} else {		rv = PQG_ParamGen(info->keysize, &params, &verify);		CHECKERROR(rv, __LINE__);		if (info->useseed) {			if (info->seed.len == 0)				get_and_write_random_bytes(&info->seed, DSA_SUBPRIME_LEN, 				                           "tmp.seed");			rv = DSA_NewKeyFromSeed(params, info->seed.data, &key);		} else {			rv = DSA_NewKey(params, &key);		}		CHECKERROR(rv, __LINE__);		dsakey_to_file(key, "tmp.key");	}	if (info->sign) {		info->out.len = 48;		info->out.data = (unsigned char *)PORT_ZAlloc(info->out.len);		if (info->usesigseed) {			if (info->sigseed.len == 0)				get_and_write_random_bytes(&info->sigseed, DSA_SUBPRIME_LEN,				                           "tmp.sigseed");			TIMESTART();			rv = DSA_SignDigestWithSeed(key, &info->out, &info->in, 			                            info->sigseed.data);			TIMEFINISH("DSA SIGN", info->in.len);		} else {			TIMESTART();			for (i=0; i<numiter; i++)				rv = DSA_SignDigest(key, &info->out, &info->in);			TIMEFINISH("DSA SIGN", info->in.len);		}		CHECKERROR(rv, __LINE__);	} else {		DSAPublicKey pubkey;		PRArenaPool *arena;		arena = key->params.arena;		SECITEM_CopyItem(arena, &pubkey.params.prime, &key->params.prime);		SECITEM_CopyItem(arena, &pubkey.params.subPrime, &key->params.subPrime);		SECITEM_CopyItem(arena, &pubkey.params.base, &key->params.base);		SECITEM_CopyItem(arena, &pubkey.publicValue, &key->publicValue);		TIMESTART();		for (i=0; i<numiter; i++)			rv = DSA_VerifyDigest(&pubkey, &info->out, &info->in);		TIMEFINISH("DSA VERIFY", info->in.len);		if (rv == SECSuccess) {			PR_fprintf(PR_STDOUT, "Signature verified.\n");		} else {			PR_fprintf(PR_STDOUT, "Signature failed verification!\n");			CHECKERROR(rv, __LINE__);		}	}	PORT_FreeArena(key->params.arena, PR_TRUE);	return SECSuccess;}