diff options
author | Dr. Stephen Henson <steve@openssl.org> | 1999-06-20 17:36:11 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 1999-06-20 17:36:11 +0000 |
commit | 8623f693d9a5c74f76311aebd29767e89467ecea (patch) | |
tree | 03798bbe6a24a55e425f874096d8b6b9486d109a /crypto/bn | |
parent | 11af1a2758baefab1157755c508d7b7490155bab (diff) |
New functions CONF_load_bio() and CONF_load_fp() to load a configuration
file from a bio or fp. Added some more constification to the BN library.
Diffstat (limited to 'crypto/bn')
-rw-r--r-- | crypto/bn/bn.h | 12 | ||||
-rw-r--r-- | crypto/bn/bn_lib.c | 2 | ||||
-rw-r--r-- | crypto/bn/bn_mpi.c | 2 | ||||
-rw-r--r-- | crypto/bn/bn_print.c | 8 |
4 files changed, 12 insertions, 12 deletions
diff --git a/crypto/bn/bn.h b/crypto/bn/bn.h index ce5a4746e4..80421a24cc 100644 --- a/crypto/bn/bn.h +++ b/crypto/bn/bn.h @@ -323,9 +323,9 @@ void BN_init(BIGNUM *); void BN_clear_free(BIGNUM *a); BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b); BIGNUM *BN_bin2bn(const unsigned char *s,int len,BIGNUM *ret); -int BN_bn2bin(BIGNUM *a, unsigned char *to); +int BN_bn2bin(const BIGNUM *a, unsigned char *to); BIGNUM *BN_mpi2bn(unsigned char *s,int len,BIGNUM *ret); -int BN_bn2mpi(BIGNUM *a, unsigned char *to); +int BN_bn2mpi(const BIGNUM *a, unsigned char *to); int BN_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b); int BN_usub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b); int BN_uadd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b); @@ -375,10 +375,10 @@ BIGNUM *BN_dup(const BIGNUM *a); int BN_ucmp(const BIGNUM *a, const BIGNUM *b); int BN_set_bit(BIGNUM *a, int n); int BN_clear_bit(BIGNUM *a, int n); -char * BN_bn2hex(BIGNUM *a); -char * BN_bn2dec(BIGNUM *a); -int BN_hex2bn(BIGNUM **a,char *str); -int BN_dec2bn(BIGNUM **a,char *str); +char * BN_bn2hex(const BIGNUM *a); +char * BN_bn2dec(const BIGNUM *a); +int BN_hex2bn(BIGNUM **a, const char *str); +int BN_dec2bn(BIGNUM **a, const char *str); int BN_gcd(BIGNUM *r,BIGNUM *in_a,BIGNUM *in_b,BN_CTX *ctx); BIGNUM *BN_mod_inverse(BIGNUM *ret,BIGNUM *a, const BIGNUM *n,BN_CTX *ctx); BIGNUM *BN_generate_prime(BIGNUM *ret,int bits,int strong,BIGNUM *add, diff --git a/crypto/bn/bn_lib.c b/crypto/bn/bn_lib.c index ee194c55b2..9c2c9d3238 100644 --- a/crypto/bn/bn_lib.c +++ b/crypto/bn/bn_lib.c @@ -629,7 +629,7 @@ BIGNUM *BN_bin2bn(const unsigned char *s, int len, BIGNUM *ret) } /* ignore negative */ -int BN_bn2bin(BIGNUM *a, unsigned char *to) +int BN_bn2bin(const BIGNUM *a, unsigned char *to) { int n,i; BN_ULONG l; diff --git a/crypto/bn/bn_mpi.c b/crypto/bn/bn_mpi.c index 5d786d7b15..80e1dca6b7 100644 --- a/crypto/bn/bn_mpi.c +++ b/crypto/bn/bn_mpi.c @@ -60,7 +60,7 @@ #include "cryptlib.h" #include "bn_lcl.h" -int BN_bn2mpi(BIGNUM *a, unsigned char *d) +int BN_bn2mpi(const BIGNUM *a, unsigned char *d) { int bits; int num=0; diff --git a/crypto/bn/bn_print.c b/crypto/bn/bn_print.c index 91418a2351..2f5ab2617b 100644 --- a/crypto/bn/bn_print.c +++ b/crypto/bn/bn_print.c @@ -65,7 +65,7 @@ static const char *Hex="0123456789ABCDEF"; /* Must 'Free' the returned data */ -char *BN_bn2hex(BIGNUM *a) +char *BN_bn2hex(const BIGNUM *a) { int i,j,v,z=0; char *buf; @@ -100,7 +100,7 @@ err: } /* Must 'Free' the returned data */ -char *BN_bn2dec(BIGNUM *a) +char *BN_bn2dec(const BIGNUM *a) { int i=0,num; char *buf=NULL; @@ -154,7 +154,7 @@ err: return(buf); } -int BN_hex2bn(BIGNUM **bn, char *a) +int BN_hex2bn(BIGNUM **bn, const char *a) { BIGNUM *ret=NULL; BN_ULONG l=0; @@ -220,7 +220,7 @@ err: return(0); } -int BN_dec2bn(BIGNUM **bn, char *a) +int BN_dec2bn(BIGNUM **bn, const char *a) { BIGNUM *ret=NULL; BN_ULONG l=0; |