Commit 48f2ef8d authored by Ulf Möller's avatar Ulf Möller
Browse files

make it a loop as in dsa

parent be1bd923
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -111,7 +111,9 @@ static int generate_key(DH *dh)
		{
		priv_key=BN_new();
		if (priv_key == NULL) goto err;
		do
			if (!BN_rand_range(priv_key, dh->p)) goto err;
		while (BN_is_zero(priv_key));
		}
	else
		priv_key=dh->priv_key;