提交 48f2ef8d 编写于 作者: U Ulf Möller

make it a loop as in dsa

上级 be1bd923
......@@ -111,7 +111,9 @@ static int generate_key(DH *dh)
{
priv_key=BN_new();
if (priv_key == NULL) goto err;
if (!BN_rand_range(priv_key, dh->p)) 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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册