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:
1a76a85
)
length of secret exponent is needed only when we create one
author
Bodo Möller
<bodo@openssl.org>
Fri, 27 Jul 2001 22:45:19 +0000
(22:45 +0000)
committer
Bodo Möller
<bodo@openssl.org>
Fri, 27 Jul 2001 22:45:19 +0000
(22:45 +0000)
crypto/dh/dh_key.c
patch
|
blob
|
history
diff --git
a/crypto/dh/dh_key.c
b/crypto/dh/dh_key.c
index e097683f0753f2610d28d40ff91fb3d1af74e257..17b267feb4ae900bed7c811fdebcf30098a993ef 100644
(file)
--- a/
crypto/dh/dh_key.c
+++ b/
crypto/dh/dh_key.c
@@
-132,10
+132,9
@@
static int generate_key(DH *dh)
}
mont=(BN_MONT_CTX *)dh->method_mont_p;
- l = dh->length ? dh->length : BN_num_bits(dh->p)-1; /* secret exponent length */
-
if (generate_new_key)
{
+ l = dh->length ? dh->length : BN_num_bits(dh->p)-1; /* secret exponent length */
if (!BN_rand(priv_key, l, 0, 0)) goto err;
}
if (!dh->meth->bn_mod_exp(dh, pub_key,dh->g,priv_key,dh->p,&ctx,mont)) goto err;