diff options
author | Ben Laurie <ben@openssl.org> | 2008-10-18 14:27:36 +0000 |
---|---|---|
committer | Ben Laurie <ben@openssl.org> | 2008-10-18 14:27:36 +0000 |
commit | b76306c9830ffa19ec2ba37074f91f4bfb347ee2 (patch) | |
tree | 7558e7f091df2d4a71c3dea9232bef0c16b367f7 /crypto | |
parent | cdffc716c9afac6591c7831804f07a531a75d36b (diff) |
Constification.
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/bn/bn.h | 4 | ||||
-rw-r--r-- | crypto/bn/bn_rand.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/crypto/bn/bn.h b/crypto/bn/bn.h index e591d4ca05..f1719a5877 100644 --- a/crypto/bn/bn.h +++ b/crypto/bn/bn.h @@ -408,8 +408,8 @@ BIGNUM *BN_CTX_get(BN_CTX *ctx); void BN_CTX_end(BN_CTX *ctx); int BN_rand(BIGNUM *rnd, int bits, int top,int bottom); int BN_pseudo_rand(BIGNUM *rnd, int bits, int top,int bottom); -int BN_rand_range(BIGNUM *rnd, BIGNUM *range); -int BN_pseudo_rand_range(BIGNUM *rnd, BIGNUM *range); +int BN_rand_range(BIGNUM *rnd, const BIGNUM *range); +int BN_pseudo_rand_range(BIGNUM *rnd, const BIGNUM *range); int BN_num_bits(const BIGNUM *a); int BN_num_bits_word(BN_ULONG); BIGNUM *BN_new(void); diff --git a/crypto/bn/bn_rand.c b/crypto/bn/bn_rand.c index f51830b12b..b376c28ff3 100644 --- a/crypto/bn/bn_rand.c +++ b/crypto/bn/bn_rand.c @@ -227,7 +227,7 @@ int BN_bntest_rand(BIGNUM *rnd, int bits, int top, int bottom) /* random number r: 0 <= r < range */ -static int bn_rand_range(int pseudo, BIGNUM *r, BIGNUM *range) +static int bn_rand_range(int pseudo, BIGNUM *r, const BIGNUM *range) { int (*bn_rand)(BIGNUM *, int, int, int) = pseudo ? BN_pseudo_rand : BN_rand; int n; @@ -294,12 +294,12 @@ static int bn_rand_range(int pseudo, BIGNUM *r, BIGNUM *range) } -int BN_rand_range(BIGNUM *r, BIGNUM *range) +int BN_rand_range(BIGNUM *r, const BIGNUM *range) { return bn_rand_range(0, r, range); } -int BN_pseudo_rand_range(BIGNUM *r, BIGNUM *range) +int BN_pseudo_rand_range(BIGNUM *r, const BIGNUM *range) { return bn_rand_range(1, r, range); } |