diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2005-04-27 00:04:59 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2005-04-27 00:04:59 +0000 |
commit | 879b19801a0bb7f92639e64564e791282a2b8354 (patch) | |
tree | a84c52f49146e0f5f779808689c9ad98ce1d33f9 /crypto/dh | |
parent | 6ec8e63af6c1835a8b222350dbabf7bb2ace094f (diff) |
Change method_mont_p from (char *) to (BN_MONT_CTX *) and remove several
casts.
Diffstat (limited to 'crypto/dh')
-rw-r--r-- | crypto/dh/dh.h | 2 | ||||
-rw-r--r-- | crypto/dh/dh_key.c | 8 |
2 files changed, 4 insertions, 6 deletions
diff --git a/crypto/dh/dh.h b/crypto/dh/dh.h index a933601245..da44778b58 100644 --- a/crypto/dh/dh.h +++ b/crypto/dh/dh.h @@ -114,7 +114,7 @@ struct dh_st BIGNUM *priv_key; /* x */ int flags; - char *method_mont_p; + BN_MONT_CTX *method_mont_p; /* Place holders if we want to do X9.42 DH */ BIGNUM *q; BIGNUM *j; diff --git a/crypto/dh/dh_key.c b/crypto/dh/dh_key.c index 1439a7a9e9..62d05a4fac 100644 --- 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) { - 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; @@ -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) { - 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; @@ -222,6 +220,6 @@ static int dh_init(DH *dh) 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); } |