projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
be1bd92
)
make it a loop as in dsa
author
Ulf Möller
<ulf@openssl.org>
Tue, 20 Feb 2001 16:17:25 +0000
(16:17 +0000)
committer
Ulf Möller
<ulf@openssl.org>
Tue, 20 Feb 2001 16:17:25 +0000
(16:17 +0000)
crypto/dh/dh_key.c
patch
|
blob
|
history
diff --git
a/crypto/dh/dh_key.c
b/crypto/dh/dh_key.c
index 7a0ace72f0d5f85755c3534489c09b30495fa8dc..ad86048a368eec84c3e78b99b9ddec116b01cc11 100644
(file)
--- a/
crypto/dh/dh_key.c
+++ b/
crypto/dh/dh_key.c
@@
-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;