From 082158786364f8b568f7ababafda6921edba3134 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Fri, 9 Mar 2001 09:42:19 +0000 Subject: [PATCH] Use krb5int_ prefix for internal "provider" structures git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13066 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/crypto/ChangeLog | 5 +++++ src/lib/crypto/cksumtypes.c | 18 +++++++-------- src/lib/crypto/enc_provider/ChangeLog | 5 +++++ src/lib/crypto/enc_provider/des.c | 2 +- src/lib/crypto/enc_provider/des3.c | 2 +- src/lib/crypto/enc_provider/enc_provider.h | 4 ++-- src/lib/crypto/etypes.c | 22 +++++++++---------- src/lib/crypto/hash_provider/ChangeLog | 6 +++++ src/lib/crypto/hash_provider/hash_crc32.c | 2 +- src/lib/crypto/hash_provider/hash_md4.c | 2 +- src/lib/crypto/hash_provider/hash_md5.c | 2 +- src/lib/crypto/hash_provider/hash_provider.h | 8 +++---- src/lib/crypto/hash_provider/hash_sha1.c | 2 +- src/lib/crypto/keyhash_provider/ChangeLog | 6 +++++ src/lib/crypto/keyhash_provider/descbc.c | 2 +- src/lib/crypto/keyhash_provider/k5_md4des.c | 2 +- src/lib/crypto/keyhash_provider/k5_md5des.c | 2 +- .../keyhash_provider/keyhash_provider.h | 6 ++--- src/lib/crypto/keyhash_provider/t_cksum.c | 8 +++---- src/lib/crypto/prng.c | 2 +- 20 files changed, 65 insertions(+), 43 deletions(-) diff --git a/src/lib/crypto/ChangeLog b/src/lib/crypto/ChangeLog index adb000d74..bb8bedb8d 100644 --- a/src/lib/crypto/ChangeLog +++ b/src/lib/crypto/ChangeLog @@ -1,3 +1,8 @@ +2001-03-09 Ken Raeburn + + * cksumtypes.c, etypes.c, prng.c: Use krb5int_ prefix for internal + "provider" structures. + 2001-03-05 Ken Raeburn * prng.c: Clean up some comments. diff --git a/src/lib/crypto/cksumtypes.c b/src/lib/crypto/cksumtypes.c index ee5bc6101..5b36657a7 100644 --- a/src/lib/crypto/cksumtypes.c +++ b/src/lib/crypto/cksumtypes.c @@ -33,44 +33,44 @@ const struct krb5_cksumtypes krb5_cksumtypes_list[] = { { CKSUMTYPE_CRC32, KRB5_CKSUMFLAG_NOT_COLL_PROOF, "crc32", "CRC-32", 0, NULL, - &krb5_hash_crc32 }, + &krb5int_hash_crc32 }, { CKSUMTYPE_RSA_MD4, 0, "md4", "RSA-MD4", 0, NULL, - &krb5_hash_md4 }, + &krb5int_hash_md4 }, { CKSUMTYPE_RSA_MD4_DES, 0, "md4-des", "RSA-MD4 with DES cbc mode", - ENCTYPE_DES_CBC_CRC, &krb5_keyhash_md4des, + ENCTYPE_DES_CBC_CRC, &krb5int_keyhash_md4des, NULL }, { CKSUMTYPE_DESCBC, 0, "des-cbc", "DES cbc mode", - ENCTYPE_DES_CBC_CRC, &krb5_keyhash_descbc, + ENCTYPE_DES_CBC_CRC, &krb5int_keyhash_descbc, NULL }, { CKSUMTYPE_RSA_MD5, 0, "md5", "RSA-MD5", 0, NULL, - &krb5_hash_md5 }, + &krb5int_hash_md5 }, { CKSUMTYPE_RSA_MD5_DES, 0, "md5-des", "RSA-MD5 with DES cbc mode", - ENCTYPE_DES_CBC_CRC, &krb5_keyhash_md5des, + ENCTYPE_DES_CBC_CRC, &krb5int_keyhash_md5des, NULL }, { CKSUMTYPE_NIST_SHA, 0, "sha", "NIST-SHA", 0, NULL, - &krb5_hash_sha1 }, + &krb5int_hash_sha1 }, { CKSUMTYPE_HMAC_SHA1_DES3, KRB5_CKSUMFLAG_DERIVE, "hmac-sha1-des3", "HMAC-SHA1 DES3 key", 0, NULL, - &krb5_hash_sha1 }, + &krb5int_hash_sha1 }, { CKSUMTYPE_HMAC_SHA1_DES3, KRB5_CKSUMFLAG_DERIVE, "hmac-sha1-des3-kd", "HMAC-SHA1 DES3 key", /* alias */ 0, NULL, - &krb5_hash_sha1 }, + &krb5int_hash_sha1 }, }; const int krb5_cksumtypes_length = diff --git a/src/lib/crypto/enc_provider/ChangeLog b/src/lib/crypto/enc_provider/ChangeLog index 6b504648e..67678779a 100644 --- a/src/lib/crypto/enc_provider/ChangeLog +++ b/src/lib/crypto/enc_provider/ChangeLog @@ -1,3 +1,8 @@ +2001-03-09 Ken Raeburn + + * des.c, des3.c, enc_provider.h: Use krb5int_ prefix for internal + "provider" structures. + 2001-03-05 Ken Raeburn * des.c, des3.c: Use const instead of krb5_const. diff --git a/src/lib/crypto/enc_provider/des.c b/src/lib/crypto/enc_provider/des.c index 3560a06b1..983bc47b7 100644 --- a/src/lib/crypto/enc_provider/des.c +++ b/src/lib/crypto/enc_provider/des.c @@ -118,7 +118,7 @@ k5_des_make_key(const krb5_data *randombits, krb5_keyblock *key) return(0); } -const struct krb5_enc_provider krb5_enc_des = { +const struct krb5_enc_provider krb5int_enc_des = { k5_des_block_size, k5_des_keysize, k5_des_encrypt, diff --git a/src/lib/crypto/enc_provider/des3.c b/src/lib/crypto/enc_provider/des3.c index 9631be395..48ee99ee9 100644 --- a/src/lib/crypto/enc_provider/des3.c +++ b/src/lib/crypto/enc_provider/des3.c @@ -126,7 +126,7 @@ k5_des3_make_key(const krb5_data *randombits, krb5_keyblock *key) return(0); } -const struct krb5_enc_provider krb5_enc_des3 = { +const struct krb5_enc_provider krb5int_enc_des3 = { k5_des3_block_size, k5_des3_keysize, k5_des3_encrypt, diff --git a/src/lib/crypto/enc_provider/enc_provider.h b/src/lib/crypto/enc_provider/enc_provider.h index c71bdbd44..ac95b58ae 100644 --- a/src/lib/crypto/enc_provider/enc_provider.h +++ b/src/lib/crypto/enc_provider/enc_provider.h @@ -26,5 +26,5 @@ #include "k5-int.h" -extern const struct krb5_enc_provider krb5_enc_des; -extern const struct krb5_enc_provider krb5_enc_des3; +extern const struct krb5_enc_provider krb5int_enc_des; +extern const struct krb5_enc_provider krb5int_enc_des3; diff --git a/src/lib/crypto/etypes.c b/src/lib/crypto/etypes.c index 8a03766c7..7aa316186 100644 --- a/src/lib/crypto/etypes.c +++ b/src/lib/crypto/etypes.c @@ -41,55 +41,55 @@ const struct krb5_keytypes krb5_enctypes_list[] = { { ENCTYPE_DES_CBC_CRC, "des-cbc-crc", "DES cbc mode with CRC-32", - &krb5_enc_des, &krb5_hash_crc32, + &krb5int_enc_des, &krb5int_hash_crc32, krb5_old_encrypt_length, krb5_old_encrypt, krb5_old_decrypt, krb5_des_string_to_key }, { ENCTYPE_DES_CBC_MD4, "des-cbc-md4", "DES cbc mode with RSA-MD4", - &krb5_enc_des, &krb5_hash_md4, + &krb5int_enc_des, &krb5int_hash_md4, krb5_old_encrypt_length, krb5_old_encrypt, krb5_old_decrypt, krb5_des_string_to_key }, { ENCTYPE_DES_CBC_MD5, "des-cbc-md5", "DES cbc mode with RSA-MD5", - &krb5_enc_des, &krb5_hash_md5, + &krb5int_enc_des, &krb5int_hash_md5, krb5_old_encrypt_length, krb5_old_encrypt, krb5_old_decrypt, krb5_des_string_to_key }, { ENCTYPE_DES_CBC_MD5, "des", "DES cbc mode with RSA-MD5", /* alias */ - &krb5_enc_des, &krb5_hash_md5, + &krb5int_enc_des, &krb5int_hash_md5, krb5_old_encrypt_length, krb5_old_encrypt, krb5_old_decrypt, krb5_des_string_to_key }, { ENCTYPE_DES_CBC_RAW, "des-cbc-raw", "DES cbc mode raw", - &krb5_enc_des, NULL, + &krb5int_enc_des, NULL, krb5_raw_encrypt_length, krb5_raw_encrypt, krb5_raw_decrypt, krb5_des_string_to_key }, { ENCTYPE_DES3_CBC_RAW, "des3-cbc-raw", "Triple DES cbc mode raw", - &krb5_enc_des3, NULL, + &krb5int_enc_des3, NULL, krb5_raw_encrypt_length, krb5_raw_encrypt, krb5_raw_decrypt, krb5_dk_string_to_key }, { ENCTYPE_DES3_CBC_SHA1, "des3-cbc-sha1", "Triple DES cbc mode with HMAC/sha1", - &krb5_enc_des3, &krb5_hash_sha1, + &krb5int_enc_des3, &krb5int_hash_sha1, krb5_dk_encrypt_length, krb5_dk_encrypt, krb5_dk_decrypt, krb5_dk_string_to_key }, { ENCTYPE_DES3_CBC_SHA1, /* alias */ "des3-hmac-sha1", "Triple DES cbc mode with HMAC/sha1", - &krb5_enc_des3, &krb5_hash_sha1, + &krb5int_enc_des3, &krb5int_hash_sha1, krb5_dk_encrypt_length, krb5_dk_encrypt, krb5_dk_decrypt, krb5_dk_string_to_key }, { ENCTYPE_DES3_CBC_SHA1, /* alias */ "des3-cbc-sha1-kd", "Triple DES cbc mode with HMAC/sha1", - &krb5_enc_des3, &krb5_hash_sha1, + &krb5int_enc_des3, &krb5int_hash_sha1, krb5_dk_encrypt_length, krb5_dk_encrypt, krb5_dk_decrypt, krb5_dk_string_to_key }, { ENCTYPE_DES_HMAC_SHA1, "des-hmac-sha1", "DES with HMAC/sha1", - &krb5_enc_des, &krb5_hash_sha1, + &krb5int_enc_des, &krb5int_hash_sha1, krb5_dk_encrypt_length, krb5_dk_encrypt, krb5_dk_decrypt, krb5_dk_string_to_key }, #ifdef ATHENA_DES3_KLUDGE @@ -100,7 +100,7 @@ const struct krb5_keytypes krb5_enctypes_list[] = { { ENCTYPE_LOCAL_DES3_HMAC_SHA1, "des3-marc-hmac-sha1", "Triple DES with HMAC/sha1 and 32-bit length code", - &krb5_enc_des3, &krb5_hash_sha1, + &krb5int_enc_des3, &krb5int_hash_sha1, krb5_marc_dk_encrypt_length, krb5_marc_dk_encrypt, krb5_marc_dk_decrypt, krb5_dk_string_to_key }, #endif diff --git a/src/lib/crypto/hash_provider/ChangeLog b/src/lib/crypto/hash_provider/ChangeLog index 9669a725b..99e1a5d41 100644 --- a/src/lib/crypto/hash_provider/ChangeLog +++ b/src/lib/crypto/hash_provider/ChangeLog @@ -1,3 +1,9 @@ +2001-03-09 Ken Raeburn + + * hash_crc32.c, hash_md4.c, hash_md5.c, hash_provider.h, + hash_sha1.c: Use krb5int_ prefix for internal "provider" + structures. + 2001-03-05 Ken Raeburn * hash_crc32.c, hash_md4.c, hash_md5.c, hash_sha1.c: Use const diff --git a/src/lib/crypto/hash_provider/hash_crc32.c b/src/lib/crypto/hash_provider/hash_crc32.c index 1d8e28ec8..7c06fa3a6 100644 --- a/src/lib/crypto/hash_provider/hash_crc32.c +++ b/src/lib/crypto/hash_provider/hash_crc32.c @@ -64,7 +64,7 @@ k5_crc32_hash(unsigned int icount, const krb5_data *input, return(0); } -const struct krb5_hash_provider krb5_hash_crc32 = { +const struct krb5_hash_provider krb5int_hash_crc32 = { k5_crc32_hash_size, k5_crc32_block_size, k5_crc32_hash diff --git a/src/lib/crypto/hash_provider/hash_md4.c b/src/lib/crypto/hash_provider/hash_md4.c index 2a3f27826..529e900d6 100644 --- a/src/lib/crypto/hash_provider/hash_md4.c +++ b/src/lib/crypto/hash_provider/hash_md4.c @@ -60,7 +60,7 @@ k5_md4_hash(unsigned int icount, const krb5_data *input, return(0); } -const struct krb5_hash_provider krb5_hash_md4 = { +const struct krb5_hash_provider krb5int_hash_md4 = { k5_md4_hash_size, k5_md4_block_size, k5_md4_hash diff --git a/src/lib/crypto/hash_provider/hash_md5.c b/src/lib/crypto/hash_provider/hash_md5.c index e3375d08d..72df9dcf6 100644 --- a/src/lib/crypto/hash_provider/hash_md5.c +++ b/src/lib/crypto/hash_provider/hash_md5.c @@ -60,7 +60,7 @@ k5_md5_hash(unsigned int icount, const krb5_data *input, return(0); } -const struct krb5_hash_provider krb5_hash_md5 = { +const struct krb5_hash_provider krb5int_hash_md5 = { k5_md5_hash_size, k5_md5_block_size, k5_md5_hash diff --git a/src/lib/crypto/hash_provider/hash_provider.h b/src/lib/crypto/hash_provider/hash_provider.h index edf7b9d94..4fa46097d 100644 --- a/src/lib/crypto/hash_provider/hash_provider.h +++ b/src/lib/crypto/hash_provider/hash_provider.h @@ -26,7 +26,7 @@ #include "k5-int.h" -extern const struct krb5_hash_provider krb5_hash_crc32; -extern const struct krb5_hash_provider krb5_hash_md4; -extern const struct krb5_hash_provider krb5_hash_md5; -extern const struct krb5_hash_provider krb5_hash_sha1; +extern const struct krb5_hash_provider krb5int_hash_crc32; +extern const struct krb5_hash_provider krb5int_hash_md4; +extern const struct krb5_hash_provider krb5int_hash_md5; +extern const struct krb5_hash_provider krb5int_hash_sha1; diff --git a/src/lib/crypto/hash_provider/hash_sha1.c b/src/lib/crypto/hash_provider/hash_sha1.c index ad3765fc1..8b7166c20 100644 --- a/src/lib/crypto/hash_provider/hash_sha1.c +++ b/src/lib/crypto/hash_provider/hash_sha1.c @@ -65,7 +65,7 @@ k5_sha1_hash(unsigned int icount, const krb5_data *input, return(0); } -const struct krb5_hash_provider krb5_hash_sha1 = { +const struct krb5_hash_provider krb5int_hash_sha1 = { k5_sha1_hash_size, k5_sha1_block_size, k5_sha1_hash diff --git a/src/lib/crypto/keyhash_provider/ChangeLog b/src/lib/crypto/keyhash_provider/ChangeLog index 3860fe446..3463f822d 100644 --- a/src/lib/crypto/keyhash_provider/ChangeLog +++ b/src/lib/crypto/keyhash_provider/ChangeLog @@ -1,3 +1,9 @@ +2001-03-09 Ken Raeburn + + * descbc.c, k5_md4des.c, k5_md5des.c, keyhash_provider.h, + t_cksum.c: Use krb5int_ prefix for internal "provider" + structures. + 2001-03-05 Ken Raeburn * descbc.c, k5_md4des.c, k5_md5des.c: Use const instead of diff --git a/src/lib/crypto/keyhash_provider/descbc.c b/src/lib/crypto/keyhash_provider/descbc.c index b1dfc4651..0394779e6 100644 --- a/src/lib/crypto/keyhash_provider/descbc.c +++ b/src/lib/crypto/keyhash_provider/descbc.c @@ -71,7 +71,7 @@ k5_descbc_hash(const krb5_keyblock *key, const krb5_data *ivec, return(0); } -const struct krb5_keyhash_provider krb5_keyhash_descbc = { +const struct krb5_keyhash_provider krb5int_keyhash_descbc = { k5_descbc_hash_size, k5_descbc_hash, NULL diff --git a/src/lib/crypto/keyhash_provider/k5_md4des.c b/src/lib/crypto/keyhash_provider/k5_md4des.c index b91b472ac..6d5b77f1a 100644 --- a/src/lib/crypto/keyhash_provider/k5_md4des.c +++ b/src/lib/crypto/keyhash_provider/k5_md4des.c @@ -191,7 +191,7 @@ k5_md4des_verify(const krb5_keyblock *key, const krb5_data *ivec, return(0); } -const struct krb5_keyhash_provider krb5_keyhash_md4des = { +const struct krb5_keyhash_provider krb5int_keyhash_md4des = { k5_md4des_hash_size, k5_md4des_hash, k5_md4des_verify diff --git a/src/lib/crypto/keyhash_provider/k5_md5des.c b/src/lib/crypto/keyhash_provider/k5_md5des.c index e628a1262..c395a7011 100644 --- a/src/lib/crypto/keyhash_provider/k5_md5des.c +++ b/src/lib/crypto/keyhash_provider/k5_md5des.c @@ -189,7 +189,7 @@ k5_md5des_verify(const krb5_keyblock *key, const krb5_data *ivec, return(0); } -const struct krb5_keyhash_provider krb5_keyhash_md5des = { +const struct krb5_keyhash_provider krb5int_keyhash_md5des = { k5_md5des_hash_size, k5_md5des_hash, k5_md5des_verify diff --git a/src/lib/crypto/keyhash_provider/keyhash_provider.h b/src/lib/crypto/keyhash_provider/keyhash_provider.h index 6ccdde8cb..139350088 100644 --- a/src/lib/crypto/keyhash_provider/keyhash_provider.h +++ b/src/lib/crypto/keyhash_provider/keyhash_provider.h @@ -26,6 +26,6 @@ #include "k5-int.h" -extern const struct krb5_keyhash_provider krb5_keyhash_descbc; -extern const struct krb5_keyhash_provider krb5_keyhash_md4des; -extern const struct krb5_keyhash_provider krb5_keyhash_md5des; +extern const struct krb5_keyhash_provider krb5int_keyhash_descbc; +extern const struct krb5_keyhash_provider krb5int_keyhash_md4des; +extern const struct krb5_keyhash_provider krb5int_keyhash_md5des; diff --git a/src/lib/crypto/keyhash_provider/t_cksum.c b/src/lib/crypto/keyhash_provider/t_cksum.c index 9ef58a089..ce9ef23bb 100644 --- a/src/lib/crypto/keyhash_provider/t_cksum.c +++ b/src/lib/crypto/keyhash_provider/t_cksum.c @@ -35,13 +35,13 @@ #define MD4_K5BETA_COMPAT #if MD == 4 -extern struct krb5_keyhash_provider krb5_keyhash_md4des; -#define khp krb5_keyhash_md4des +extern struct krb5_keyhash_provider krb5int_keyhash_md4des; +#define khp krb5int_keyhash_md4des #endif #if MD == 5 -extern struct krb5_keyhash_provider krb5_keyhash_md5des; -#define khp krb5_keyhash_md5des +extern struct krb5_keyhash_provider krb5int_keyhash_md5des; +#define khp krb5int_keyhash_md5des #endif static void diff --git a/src/lib/crypto/prng.c b/src/lib/crypto/prng.c index ebad1fe90..aec6781da 100644 --- a/src/lib/crypto/prng.c +++ b/src/lib/crypto/prng.c @@ -37,7 +37,7 @@ output. The output is fed back as new seed data, as described above. */ -static const struct krb5_enc_provider *const enc = &krb5_enc_des3; +static const struct krb5_enc_provider *const enc = &krb5int_enc_des3; /* XXX state. Should it be in krb5_context? */ -- 2.26.2