diff --git a/crypto/bn.h b/crypto/bn.h index 9c529e2..a7c0628 100644 --- a/crypto/bn.h +++ b/crypto/bn.h @@ -385,8 +385,8 @@ int BN_mod_exp_mont_word(BIGNUM *r, BN_ULONG a, const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); int BN_mod_exp2_mont(BIGNUM *r, BIGNUM *a1, BIGNUM *p1,BIGNUM *a2, BIGNUM *p2,BIGNUM *m,BN_CTX *ctx,BN_MONT_CTX *m_ctx); -int BN_mod_exp_simple(BIGNUM *r, BIGNUM *a, BIGNUM *p, - BIGNUM *m,BN_CTX *ctx); +int BN_mod_exp_simple(BIGNUM *r, BIGNUM *a, const BIGNUM *p, + const BIGNUM *m,BN_CTX *ctx); int BN_mask_bits(BIGNUM *a,int n); int BN_mod_mul(BIGNUM *ret, BIGNUM *a, BIGNUM *b, const BIGNUM *m, BN_CTX *ctx); #ifndef NO_FP_API diff --git a/crypto/bn_ctx.c b/crypto/bn_ctx.c index 525f74a..80f4529 100644 --- a/crypto/bn_ctx.c +++ b/crypto/bn_ctx.c @@ -63,7 +63,6 @@ #include #include "bn.h" -#if 0 BN_CTX *BN_CTX_new(void) { BN_CTX *ret; @@ -79,7 +78,6 @@ BN_CTX *BN_CTX_new(void) ret->flags=BN_FLG_MALLOCED; return(ret); } -#endif void BN_CTX_init(BN_CTX *ctx) { diff --git a/crypto/bn_exp.c b/crypto/bn_exp.c index e512317..1c1eedb 100644 --- a/crypto/bn_exp.c +++ b/crypto/bn_exp.c @@ -795,7 +795,7 @@ err: #endif /* The old fallback, simple version :-) */ -int BN_mod_exp_simple(BIGNUM *r, BIGNUM *a, BIGNUM *p, BIGNUM *m, +int BN_mod_exp_simple(BIGNUM *r, BIGNUM *a, const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx) { int i,j,bits,ret=0,wstart,wend,window,wvalue,ts=0;