if(found) bn_verify(rnd);
BIGNUM *BN_generate_prime(BIGNUM *ret, int bits, int safe,	const BIGNUM *add, const BIGNUM *rem,	void (*callback)(int,int,void *), void *cb_arg)	{	BN_GENCB cb;	BIGNUM *rnd=NULL;	int found = 0;	BN_GENCB_set_old(&cb, callback, cb_arg);	if (ret == NULL)		{		if ((rnd=BN_new()) == NULL) goto err;		}	else		rnd=ret;	bn_verify(rnd);	if(!BN_generate_prime_ex(rnd, bits, safe, add, rem, &cb))		goto err;	/* we have a prime :-) */	found = 1;err:	if (!found && (ret == NULL) && (rnd != NULL)) BN_free(rnd);	if(found) bn_verify(rnd);	return(found ? rnd : NULL);	}