projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Change method_mont_p from (char *) to (BN_MONT_CTX *) and remove several
[openssl.git]
/
crypto
/
dh
/
dh_key.c
diff --git
a/crypto/dh/dh_key.c
b/crypto/dh/dh_key.c
index
1439a7a
..
62d05a4
100644
(file)
--- a/
crypto/dh/dh_key.c
+++ b/
crypto/dh/dh_key.c
@@
-130,8
+130,7
@@
static int generate_key(DH *dh)
if (dh->flags & DH_FLAG_CACHE_MONT_P)
{
if (dh->flags & DH_FLAG_CACHE_MONT_P)
{
- mont = BN_MONT_CTX_set_locked(
- (BN_MONT_CTX **)&dh->method_mont_p,
+ mont = BN_MONT_CTX_set_locked(&dh->method_mont_p,
CRYPTO_LOCK_DH, dh->p, ctx);
if (!mont)
goto err;
CRYPTO_LOCK_DH, dh->p, ctx);
if (!mont)
goto err;
@@
-178,8
+177,7
@@
static int compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh)
if (dh->flags & DH_FLAG_CACHE_MONT_P)
{
if (dh->flags & DH_FLAG_CACHE_MONT_P)
{
- mont = BN_MONT_CTX_set_locked(
- (BN_MONT_CTX **)&dh->method_mont_p,
+ mont = BN_MONT_CTX_set_locked(&dh->method_mont_p,
CRYPTO_LOCK_DH, dh->p, ctx);
if (!mont)
goto err;
CRYPTO_LOCK_DH, dh->p, ctx);
if (!mont)
goto err;
@@
-222,6
+220,6
@@
static int dh_init(DH *dh)
static int dh_finish(DH *dh)
{
if(dh->method_mont_p)
static int dh_finish(DH *dh)
{
if(dh->method_mont_p)
- BN_MONT_CTX_free(
(BN_MONT_CTX *)
dh->method_mont_p);
+ BN_MONT_CTX_free(dh->method_mont_p);
return(1);
}
return(1);
}