diff options
author | Bodo Möller <bodo@openssl.org> | 2009-12-22 10:59:03 +0000 |
---|---|---|
committer | Bodo Möller <bodo@openssl.org> | 2009-12-22 10:59:03 +0000 |
commit | d0e79d7e2cbef667b68380cf7202c61d83c228aa (patch) | |
tree | 0a857ad0ab2a6527ce775ac672d5f5f4664341b6 | |
parent | c1003dfd1579f0a7a88d230baecc98fa5eef0bc7 (diff) | |
download | openssl-d0e79d7e2cbef667b68380cf7202c61d83c228aa.tar.gz |
Constify crypto/cast.
-rw-r--r-- | CHANGES | 4 | ||||
-rw-r--r-- | crypto/cast/c_cfb64.c | 3 | ||||
-rw-r--r-- | crypto/cast/c_ecb.c | 3 | ||||
-rw-r--r-- | crypto/cast/c_enc.c | 7 | ||||
-rw-r--r-- | crypto/cast/c_ofb64.c | 3 | ||||
-rw-r--r-- | crypto/cast/cast.h | 12 |
6 files changed, 16 insertions, 16 deletions
@@ -4,6 +4,10 @@ Changes between 0.9.8l (?) and 0.9.8m (?) [xx XXX xxxx] + *) Constify crypto/cast (i.e., <openssl/cast.h>): a CAST_KEY doesn't + change when encrypting or decrypting. + [Bodo Moeller] + *) Add option SSL_OP_LEGACY_SERVER_CONNECT which will allow clients to connect (but not renegotiate) with servers which do not support RI. Until RI is more widely deployed this option is enabled by default. diff --git a/crypto/cast/c_cfb64.c b/crypto/cast/c_cfb64.c index 514c005c32..dcec13a201 100644 --- a/crypto/cast/c_cfb64.c +++ b/crypto/cast/c_cfb64.c @@ -65,7 +65,7 @@ */ void CAST_cfb64_encrypt(const unsigned char *in, unsigned char *out, - long length, CAST_KEY *schedule, unsigned char *ivec, + long length, const CAST_KEY *schedule, unsigned char *ivec, int *num, int enc) { register CAST_LONG v0,v1,t; @@ -119,4 +119,3 @@ void CAST_cfb64_encrypt(const unsigned char *in, unsigned char *out, v0=v1=ti[0]=ti[1]=t=c=cc=0; *num=n; } - diff --git a/crypto/cast/c_ecb.c b/crypto/cast/c_ecb.c index f2dc606226..b6a3b1fff9 100644 --- a/crypto/cast/c_ecb.c +++ b/crypto/cast/c_ecb.c @@ -63,7 +63,7 @@ const char CAST_version[]="CAST" OPENSSL_VERSION_PTEXT; void CAST_ecb_encrypt(const unsigned char *in, unsigned char *out, - CAST_KEY *ks, int enc) + const CAST_KEY *ks, int enc) { CAST_LONG l,d[2]; @@ -77,4 +77,3 @@ void CAST_ecb_encrypt(const unsigned char *in, unsigned char *out, l=d[1]; l2n(l,out); l=d[0]=d[1]=0; } - diff --git a/crypto/cast/c_enc.c b/crypto/cast/c_enc.c index 0fe2cffecc..433b5f11b8 100644 --- a/crypto/cast/c_enc.c +++ b/crypto/cast/c_enc.c @@ -59,7 +59,7 @@ #include <openssl/cast.h> #include "cast_lcl.h" -void CAST_encrypt(CAST_LONG *data, CAST_KEY *key) +void CAST_encrypt(CAST_LONG *data, const CAST_KEY *key) { register CAST_LONG l,r,*k,t; @@ -91,7 +91,7 @@ void CAST_encrypt(CAST_LONG *data, CAST_KEY *key) data[0]=r&0xffffffffL; } -void CAST_decrypt(CAST_LONG *data, CAST_KEY *key) +void CAST_decrypt(CAST_LONG *data, const CAST_KEY *key) { register CAST_LONG l,r,*k,t; @@ -124,7 +124,7 @@ void CAST_decrypt(CAST_LONG *data, CAST_KEY *key) } void CAST_cbc_encrypt(const unsigned char *in, unsigned char *out, long length, - CAST_KEY *ks, unsigned char *iv, int enc) + const CAST_KEY *ks, unsigned char *iv, int enc) { register CAST_LONG tin0,tin1; register CAST_LONG tout0,tout1,xor0,xor1; @@ -204,4 +204,3 @@ void CAST_cbc_encrypt(const unsigned char *in, unsigned char *out, long length, tin0=tin1=tout0=tout1=xor0=xor1=0; tin[0]=tin[1]=0; } - diff --git a/crypto/cast/c_ofb64.c b/crypto/cast/c_ofb64.c index fd0469a62f..cb3222456c 100644 --- a/crypto/cast/c_ofb64.c +++ b/crypto/cast/c_ofb64.c @@ -64,7 +64,7 @@ * 64bit block we have used is contained in *num; */ void CAST_ofb64_encrypt(const unsigned char *in, unsigned char *out, - long length, CAST_KEY *schedule, unsigned char *ivec, + long length, const CAST_KEY *schedule, unsigned char *ivec, int *num) { register CAST_LONG v0,v1,t; @@ -108,4 +108,3 @@ void CAST_ofb64_encrypt(const unsigned char *in, unsigned char *out, t=v0=v1=ti[0]=ti[1]=0; *num=n; } - diff --git a/crypto/cast/cast.h b/crypto/cast/cast.h index 1faf5806aa..6e0cd31ae4 100644 --- a/crypto/cast/cast.h +++ b/crypto/cast/cast.h @@ -87,17 +87,17 @@ typedef struct cast_key_st void private_CAST_set_key(CAST_KEY *key, int len, const unsigned char *data); #endif void CAST_set_key(CAST_KEY *key, int len, const unsigned char *data); -void CAST_ecb_encrypt(const unsigned char *in,unsigned char *out,CAST_KEY *key, +void CAST_ecb_encrypt(const unsigned char *in, unsigned char *out, const CAST_KEY *key, int enc); -void CAST_encrypt(CAST_LONG *data,CAST_KEY *key); -void CAST_decrypt(CAST_LONG *data,CAST_KEY *key); +void CAST_encrypt(CAST_LONG *data, const CAST_KEY *key); +void CAST_decrypt(CAST_LONG *data, const CAST_KEY *key); void CAST_cbc_encrypt(const unsigned char *in, unsigned char *out, long length, - CAST_KEY *ks, unsigned char *iv, int enc); + const CAST_KEY *ks, unsigned char *iv, int enc); void CAST_cfb64_encrypt(const unsigned char *in, unsigned char *out, - long length, CAST_KEY *schedule, unsigned char *ivec, + long length, const CAST_KEY *schedule, unsigned char *ivec, int *num, int enc); void CAST_ofb64_encrypt(const unsigned char *in, unsigned char *out, - long length, CAST_KEY *schedule, unsigned char *ivec, + long length, const CAST_KEY *schedule, unsigned char *ivec, int *num); #ifdef __cplusplus |