Constification.
authorBen Laurie <ben@openssl.org>
Sun, 19 Oct 2008 22:51:27 +0000 (22:51 +0000)
committerBen Laurie <ben@openssl.org>
Sun, 19 Oct 2008 22:51:27 +0000 (22:51 +0000)
crypto/bn/bn.h
crypto/bn/bn_rand.c

index dc0debb85afbe2a079632216d4fd64c0a410115b..e366106f1268f91f59cc7dca4f8c35a9e8db0fba 100644 (file)
@@ -416,8 +416,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);
index f51830b12ba8fde83a584c3455cc1ee215031f5e..b376c28ff3ff25b027922964af6ca26b4995250a 100644 (file)
@@ -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);
        }