summaryrefslogtreecommitdiffstats
path: root/crypto/bn/bn_exp2.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2000-11-06 21:15:54 +0000
committerRichard Levitte <levitte@openssl.org>2000-11-06 21:15:54 +0000
commit020fc820dc90dbbcf0d7e3f3345af9e44cf905a7 (patch)
tree43557879bf9ba3fd467211edf75155c45a51fd6f /crypto/bn/bn_exp2.c
parentbc8a9f1f0fa10e75a8a3610d870c37d742cb0eb7 (diff)
Constify the BIGNUM routines a bit more. The only trouble were the
two functions that did expansion on in parameters (BN_mul() and BN_sqr()). The problem was solved by making bn_dup_expand() which is a mix of bn_expand2() and BN_dup().
Diffstat (limited to 'crypto/bn/bn_exp2.c')
-rw-r--r--crypto/bn/bn_exp2.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/crypto/bn/bn_exp2.c b/crypto/bn/bn_exp2.c
index 29029f4c72..70c4d83a79 100644
--- a/crypto/bn/bn_exp2.c
+++ b/crypto/bn/bn_exp2.c
@@ -115,13 +115,14 @@
#define TABLE_SIZE 32
-int BN_mod_exp2_mont(BIGNUM *rr, BIGNUM *a1, BIGNUM *p1, BIGNUM *a2,
- BIGNUM *p2, BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont)
+int BN_mod_exp2_mont(BIGNUM *rr, const BIGNUM *a1, const BIGNUM *p1,
+ const BIGNUM *a2, const BIGNUM *p2, const BIGNUM *m,
+ BN_CTX *ctx, BN_MONT_CTX *in_mont)
{
int i,j,bits,b,bits1,bits2,ret=0,wpos1,wpos2,window1,window2,wvalue1,wvalue2;
int r_is_one=1,ts1=0,ts2=0;
BIGNUM *d,*r;
- BIGNUM *a_mod_m;
+ const BIGNUM *a_mod_m;
BIGNUM val1[TABLE_SIZE], val2[TABLE_SIZE];
BN_MONT_CTX *mont=NULL;