mirror of
https://github.com/openssl/openssl.git
synced 2025-01-18 13:44:20 +08:00
make it a loop as in dsa
This commit is contained in:
parent
be1bd9239f
commit
48f2ef8d00
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user