From: Ken Raeburn Date: Sat, 20 Dec 2003 02:26:17 +0000 (+0000) Subject: Replace the array of 8 mit_des_cblock object 'mit_des_zeroblock' defined X-Git-Tag: krb5-1.4-beta1~687 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8d77691b645873e8699e21d7e023150664a6bf1f;p=krb5.git Replace the array of 8 mit_des_cblock object 'mit_des_zeroblock' defined locally in multiple files with one defined in f_cbc.c; make it a single element rather than an array. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15945 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/crypto/des/ChangeLog b/src/lib/crypto/des/ChangeLog index 70cf9b8a9..e537e3c26 100644 --- a/src/lib/crypto/des/ChangeLog +++ b/src/lib/crypto/des/ChangeLog @@ -1,3 +1,10 @@ +2003-12-19 Ken Raeburn + + * f_cbc.c (mit_des_zeroblock): Define, as a single cblock, not the + array of 8 that was used elsewhere. + * des_int.h (mit_des_zeroblock): Declare, and use a macro to stick + a krb5int prefix on it. + 2003-07-22 Ken Raeburn * f_cbc.c (krb5int_des_cbc_decrypt): Move declarations that were diff --git a/src/lib/crypto/des/des_int.h b/src/lib/crypto/des/des_int.h index 55f0c241f..c330a935a 100644 --- a/src/lib/crypto/des/des_int.h +++ b/src/lib/crypto/des/des_int.h @@ -130,6 +130,9 @@ extern int mit_des_cbc_encrypt (const mit_des_cblock *in, const mit_des_key_schedule schedule, const mit_des_cblock ivec, int enc); +#define mit_des_zeroblock krb5int_c_mit_des_zeroblock +extern const mit_des_cblock mit_des_zeroblock; + /* fin_rndkey.c */ extern krb5_error_code mit_des_finish_random_key ( const krb5_encrypt_block *, diff --git a/src/lib/crypto/des/f_cbc.c b/src/lib/crypto/des/f_cbc.c index c09060fc5..dea27e702 100644 --- a/src/lib/crypto/des/f_cbc.c +++ b/src/lib/crypto/des/f_cbc.c @@ -36,6 +36,8 @@ * cleartext. */ +const mit_des_cblock mit_des_zeroblock /* = all zero */; + #undef mit_des_cbc_encrypt int mit_des_cbc_encrypt(in, out, length, schedule, ivec, enc) diff --git a/src/lib/crypto/enc_provider/ChangeLog b/src/lib/crypto/enc_provider/ChangeLog index 89bf6dec9..a11976c64 100644 --- a/src/lib/crypto/enc_provider/ChangeLog +++ b/src/lib/crypto/enc_provider/ChangeLog @@ -1,3 +1,8 @@ +2003-12-19 Ken Raeburn + + * des.c (mit_des_zeroblock): Don't define here. + * des3.c (mit_des_zeroblock): Don't define here. + 2003-07-22 Ken Raeburn * aes.c (aes_block_size, aes128_keysize, aes256_keysize): diff --git a/src/lib/crypto/enc_provider/des.c b/src/lib/crypto/enc_provider/des.c index 70082bc24..561e980f8 100644 --- a/src/lib/crypto/enc_provider/des.c +++ b/src/lib/crypto/enc_provider/des.c @@ -28,8 +28,6 @@ #include "des_int.h" #include "enc_provider.h" -static const mit_des_cblock mit_des_zeroblock[8] /* = all zero */; - static krb5_error_code k5_des_docrypt(const krb5_keyblock *key, const krb5_data *ivec, const krb5_data *input, krb5_data *output, int enc) diff --git a/src/lib/crypto/enc_provider/des3.c b/src/lib/crypto/enc_provider/des3.c index 048a220e6..f844747c8 100644 --- a/src/lib/crypto/enc_provider/des3.c +++ b/src/lib/crypto/enc_provider/des3.c @@ -27,8 +27,6 @@ #include "k5-int.h" #include "des_int.h" -static const mit_des_cblock mit_des_zeroblock[8] /* = all zero */; - static krb5_error_code validate_and_schedule(const krb5_keyblock *key, const krb5_data *ivec, const krb5_data *input, const krb5_data *output, diff --git a/src/lib/crypto/keyhash_provider/ChangeLog b/src/lib/crypto/keyhash_provider/ChangeLog index 6f0931f1d..accfb953d 100644 --- a/src/lib/crypto/keyhash_provider/ChangeLog +++ b/src/lib/crypto/keyhash_provider/ChangeLog @@ -1,3 +1,9 @@ +2003-12-19 Ken Raeburn + + * descbc.c (mit_des_zeroblock): Don't define here. + * k5_md4des.c (mit_des_zeroblock): Don't define here. + * k5_md5des.c (mit_des_zeroblock): Don't define here. + 2003-07-22 Ken Raeburn * descbc.c (k5_descbc_hash_size): Deleted. diff --git a/src/lib/crypto/keyhash_provider/descbc.c b/src/lib/crypto/keyhash_provider/descbc.c index e13b39b85..fcccbfa7c 100644 --- a/src/lib/crypto/keyhash_provider/descbc.c +++ b/src/lib/crypto/keyhash_provider/descbc.c @@ -28,8 +28,6 @@ #include "des_int.h" #include "keyhash_provider.h" -static const mit_des_cblock mit_des_zeroblock[8] /* = all zero */; - static krb5_error_code k5_descbc_hash(const krb5_keyblock *key, krb5_keyusage usage, const krb5_data *ivec, const krb5_data *input, krb5_data *output) diff --git a/src/lib/crypto/keyhash_provider/k5_md4des.c b/src/lib/crypto/keyhash_provider/k5_md4des.c index d31eb54a8..8e9623901 100644 --- a/src/lib/crypto/keyhash_provider/k5_md4des.c +++ b/src/lib/crypto/keyhash_provider/k5_md4des.c @@ -34,8 +34,6 @@ /* Force acceptance of krb5-beta5 md4des checksum for now. */ #define KRB5_MD4DES_BETA5_COMPAT -static const mit_des_cblock mit_des_zeroblock[8] /* = all zero */; - /* des-cbc(xorkey, conf | rsa-md4(conf | data)) */ /* this could be done in terms of the md4 and des providers, but diff --git a/src/lib/crypto/keyhash_provider/k5_md5des.c b/src/lib/crypto/keyhash_provider/k5_md5des.c index 173531083..4f7b89812 100644 --- a/src/lib/crypto/keyhash_provider/k5_md5des.c +++ b/src/lib/crypto/keyhash_provider/k5_md5des.c @@ -34,8 +34,6 @@ /* Force acceptance of krb5-beta5 md5des checksum for now. */ #define KRB5_MD5DES_BETA5_COMPAT -static const mit_des_cblock mit_des_zeroblock[8] /* = all zero */; - /* des-cbc(xorkey, conf | rsa-md5(conf | data)) */ /* this could be done in terms of the md5 and des providers, but