krb5_const -> const
authorKen Raeburn <raeburn@mit.edu>
Tue, 6 Mar 2001 02:18:47 +0000 (02:18 +0000)
committerKen Raeburn <raeburn@mit.edu>
Tue, 6 Mar 2001 02:18:47 +0000 (02:18 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13058 dc483132-0cff-0310-8789-dd5450dbe970

41 files changed:
src/lib/crypto/ChangeLog
src/lib/crypto/crc32/ChangeLog
src/lib/crypto/crc32/crc-32.h
src/lib/crypto/crc32/crc.c
src/lib/crypto/crc32/crc32.c
src/lib/crypto/decrypt.c
src/lib/crypto/dk/ChangeLog
src/lib/crypto/dk/checksum.c
src/lib/crypto/dk/derive.c
src/lib/crypto/dk/dk.h
src/lib/crypto/dk/dk_decrypt.c
src/lib/crypto/dk/dk_encrypt.c
src/lib/crypto/dk/stringtokey.c
src/lib/crypto/enc_provider/ChangeLog
src/lib/crypto/enc_provider/des.c
src/lib/crypto/enc_provider/des3.c
src/lib/crypto/encrypt.c
src/lib/crypto/hash_provider/ChangeLog
src/lib/crypto/hash_provider/hash_crc32.c
src/lib/crypto/hash_provider/hash_md4.c
src/lib/crypto/hash_provider/hash_md5.c
src/lib/crypto/hash_provider/hash_sha1.c
src/lib/crypto/hmac.c
src/lib/crypto/keyhash_provider/ChangeLog
src/lib/crypto/keyhash_provider/descbc.c
src/lib/crypto/keyhash_provider/k5_md4des.c
src/lib/crypto/keyhash_provider/k5_md5des.c
src/lib/crypto/make_checksum.c
src/lib/crypto/nfold.c
src/lib/crypto/old/ChangeLog
src/lib/crypto/old/des_stringtokey.c
src/lib/crypto/old/old.h
src/lib/crypto/old/old_decrypt.c
src/lib/crypto/old/old_encrypt.c
src/lib/crypto/old_api_glue.c
src/lib/crypto/raw/ChangeLog
src/lib/crypto/raw/raw.h
src/lib/crypto/raw/raw_decrypt.c
src/lib/crypto/raw/raw_encrypt.c
src/lib/crypto/string_to_key.c
src/lib/crypto/verify_checksum.c

index 4e961ab9e6225916a3865ddb9776a31a6ae87ded..adb000d74a5f8c0c32e240473cb077f2c6197f2f 100644 (file)
@@ -3,6 +3,10 @@
        * prng.c: Clean up some comments.
        (enc): Use des3 now.
 
+       * decrypt.c, encrypt.c, hmac.c, make_checksum.c, nfold.c,
+       old_api_glue.c, string_to_key.c, verify_checksum.c: Use const
+       instead of krb5_const.
+
 2001-01-29  Ken Raeburn  <raeburn@mit.edu>
 
        * make_checksum.c (krb5_c_make_checksum): Clear checksum contents
index e1c64e45719f4436b9067dcbc0fea154bb28a155..3a50f9f5c8c3cb6634ddb90a2883e5ff57082ff8 100644 (file)
@@ -1,3 +1,7 @@
+2001-03-05  Ken Raeburn  <raeburn@mit.edu>
+
+       * crc-32.h, crc.c, crc32.c: Use const instead of krb5_const.
+
 1999-10-26  Wilfredo Sanchez  <tritan@mit.edu>
 
        * Makefile.in: Clean up usage of CFLAGS, CPPFLAGS, DEFS, DEFINES,
index e366d697038d49b91963817d1661a06cf7fa6540..94e6431c8d84c3a072037394d8274ec176b08978 100644 (file)
@@ -60,7 +60,7 @@
 #define CRC32_CKSUM_LENGTH     4
 
 void
-mit_crc32 PROTOTYPE((krb5_const krb5_pointer in, krb5_const size_t in_length,
+mit_crc32 PROTOTYPE((const krb5_pointer in, const size_t in_length,
                     unsigned long *c));
 
 extern krb5_checksum_entry crc32_cksumtable_entry;
index 313076f92b2c67c4e46e01bb53c1a19a92b2e0b5..4377f1c5be86d7c1029e75f2514fe1a2b2cef1d9 100644 (file)
@@ -150,26 +150,26 @@ static u_long const crc_table[256] = {
 
 static krb5_error_code
 crc32_sum_func PROTOTYPE((
-       krb5_const krb5_pointer in,
-       krb5_const size_t in_length,
-       krb5_const krb5_pointer seed,
-       krb5_const size_t seed_length,
+       const krb5_pointer in,
+       const size_t in_length,
+       const krb5_pointer seed,
+       const size_t seed_length,
        krb5_checksum FAR *outcksum));
 
 static krb5_error_code
 crc32_verify_func PROTOTYPE((
-       krb5_const krb5_checksum FAR *cksum,
-       krb5_const krb5_pointer in,
-       krb5_const size_t in_length,
-       krb5_const krb5_pointer seed,
-       krb5_const size_t seed_length));
+       const krb5_checksum FAR *cksum,
+       const krb5_pointer in,
+       const size_t in_length,
+       const krb5_pointer seed,
+       const size_t seed_length));
 
 static krb5_error_code
 crc32_sum_func(in, in_length, seed, seed_length, outcksum)
-    krb5_const krb5_pointer in;
-    krb5_const size_t in_length;
-    krb5_const krb5_pointer seed;
-    krb5_const size_t seed_length;
+    const krb5_pointer in;
+    const size_t in_length;
+    const krb5_pointer seed;
+    const size_t seed_length;
     krb5_checksum FAR *outcksum;
 {
     register u_char *data;
@@ -199,11 +199,11 @@ crc32_sum_func(in, in_length, seed, seed_length, outcksum)
 
 static krb5_error_code
 crc32_verify_func(cksum, in, in_length, seed, seed_length)
-    krb5_const krb5_checksum FAR *cksum;
-    krb5_const krb5_pointer in;
-    krb5_const size_t in_length;
-    krb5_const krb5_pointer seed;
-    krb5_const size_t seed_length;
+    const krb5_checksum FAR *cksum;
+    const krb5_pointer in;
+    const size_t in_length;
+    const krb5_pointer seed;
+    const size_t seed_length;
 {
     register u_char *data;
     register u_long c = 0;
index 9b2bc4f6ac39e9fe072178fe70e25897cf9a9305..00be8fd650f2149742946fdf073cbe867d2963ff 100644 (file)
@@ -148,8 +148,8 @@ static u_long const crc_table[256] = {
 
 void
 mit_crc32(in, in_length, cksum)
-    krb5_const krb5_pointer in;
-    krb5_const size_t in_length;
+    const krb5_pointer in;
+    const size_t in_length;
     unsigned long *cksum;
 {
     register u_char *data;
index 0d66ec0c0e4a9dd85940ece6db87c30bb7045dc5..4e759a50c8934469ef02e283effaa0680d6beb60 100644 (file)
 KRB5_DLLIMP krb5_error_code KRB5_CALLCONV
 krb5_c_decrypt(context, key, usage, ivec, input, output)
      krb5_context context;
-     krb5_const krb5_keyblock *key;
+     const krb5_keyblock *key;
      krb5_keyusage usage;
-     krb5_const krb5_data *ivec;
-     krb5_const krb5_enc_data *input;
+     const krb5_data *ivec;
+     const krb5_enc_data *input;
      krb5_data *output;
 {
     int i;
index ac67ff9e5788037a0fa1d0e73bc8bcc068dff35b..7e9c1900bceacb88c954995502776d9f90af4066 100644 (file)
@@ -1,3 +1,8 @@
+2001-03-05  Ken Raeburn  <raeburn@mit.edu>
+
+       * checksum.c, derive.c, dk.h, dk_decrypt.c, dk_encrypt.c,
+       stringtokey.c: Use const instead of krb5_const.
+
 2001-01-23  Ken Raeburn  <raeburn@mit.edu>
 
        * stringtokey.c (kerberos): Now const.
index 535ea7c047f91734d59446a69621f0992ad0d0c3..ab1d00a926a2e4b95ae7da8bd40d8e7df24745e2 100644 (file)
 
 krb5_error_code
 krb5_dk_make_checksum(hash, key, usage, input, output)
-     krb5_const struct krb5_hash_provider *hash;
-     krb5_const krb5_keyblock *key;
+     const struct krb5_hash_provider *hash;
+     const krb5_keyblock *key;
      krb5_keyusage usage;
-     krb5_const krb5_data *input;
+     const krb5_data *input;
      krb5_data *output;
 {
     int i;
@@ -106,10 +106,10 @@ cleanup:
 #ifdef ATHENA_DES3_KLUDGE
 krb5_error_code
 krb5_marc_dk_make_checksum(hash, key, usage, input, output)
-     krb5_const struct krb5_hash_provider *hash;
-     krb5_const krb5_keyblock *key;
+     const struct krb5_hash_provider *hash;
+     const krb5_keyblock *key;
      krb5_keyusage usage;
-     krb5_const krb5_data *input;
+     const krb5_data *input;
      krb5_data *output;
 {
     int i;
index dbd4a2a2d84bdd9fc977380852a5117b3f4edba0..8129ae8aae640c0b253a370c62e4b2cdd61fb59f 100644 (file)
 
 krb5_error_code
 krb5_derive_key(enc, inkey, outkey, in_constant)
-     krb5_const struct krb5_enc_provider *enc;
-     krb5_const krb5_keyblock *inkey;
+     const struct krb5_enc_provider *enc;
+     const krb5_keyblock *inkey;
      krb5_keyblock *outkey;
-     krb5_const krb5_data *in_constant;
+     const krb5_data *in_constant;
 {
     size_t blocksize, keybytes, keylength, n;
     unsigned char *inblockdata, *outblockdata, *rawkey;
index 996fed1f2157768e07d90dbd6a51aa23086add96..57be71db78efaf3d907b02560645d3017af7d0a3 100644 (file)
 #include "k5-int.h"
 
 void krb5_dk_encrypt_length
-KRB5_PROTOTYPE((krb5_const struct krb5_enc_provider *enc,
-               krb5_const struct krb5_hash_provider *hash,
+KRB5_PROTOTYPE((const struct krb5_enc_provider *enc,
+               const struct krb5_hash_provider *hash,
                size_t input, size_t *length));
 
 krb5_error_code krb5_dk_encrypt
-KRB5_PROTOTYPE((krb5_const struct krb5_enc_provider *enc,
-               krb5_const struct krb5_hash_provider *hash,
-               krb5_const krb5_keyblock *key, krb5_keyusage usage,
-               krb5_const krb5_data *ivec,
-               krb5_const krb5_data *input, krb5_data *output));
+KRB5_PROTOTYPE((const struct krb5_enc_provider *enc,
+               const struct krb5_hash_provider *hash,
+               const krb5_keyblock *key, krb5_keyusage usage,
+               const krb5_data *ivec,
+               const krb5_data *input, krb5_data *output));
 
 krb5_error_code krb5_dk_decrypt
-KRB5_PROTOTYPE((krb5_const struct krb5_enc_provider *enc,
-               krb5_const struct krb5_hash_provider *hash,
-               krb5_const krb5_keyblock *key, krb5_keyusage usage,
-               krb5_const krb5_data *ivec, krb5_const krb5_data *input,
+KRB5_PROTOTYPE((const struct krb5_enc_provider *enc,
+               const struct krb5_hash_provider *hash,
+               const krb5_keyblock *key, krb5_keyusage usage,
+               const krb5_data *ivec, const krb5_data *input,
                krb5_data *arg_output));
 
 krb5_error_code krb5_dk_string_to_key
-KRB5_PROTOTYPE((krb5_const struct krb5_enc_provider *enc, 
-               krb5_const krb5_data *string, krb5_const krb5_data *salt,
+KRB5_PROTOTYPE((const struct krb5_enc_provider *enc, 
+               const krb5_data *string, const krb5_data *salt,
                krb5_keyblock *key));
 
 krb5_error_code krb5_derive_key
-KRB5_PROTOTYPE((krb5_const struct krb5_enc_provider *enc,
-               krb5_const krb5_keyblock *inkey,
-               krb5_keyblock *outkey, krb5_const krb5_data *in_constant));
+KRB5_PROTOTYPE((const struct krb5_enc_provider *enc,
+               const krb5_keyblock *inkey,
+               krb5_keyblock *outkey, const krb5_data *in_constant));
 
 krb5_error_code krb5_dk_make_checksum
-KRB5_PROTOTYPE((krb5_const struct krb5_hash_provider *hash,
-               krb5_const krb5_keyblock *key, krb5_keyusage usage,
-               krb5_const krb5_data *input, krb5_data *output));
+KRB5_PROTOTYPE((const struct krb5_hash_provider *hash,
+               const krb5_keyblock *key, krb5_keyusage usage,
+               const krb5_data *input, krb5_data *output));
 
 #ifdef ATHENA_DES3_KLUDGE
 void krb5_marc_dk_encrypt_length
-KRB5_PROTOTYPE((krb5_const struct krb5_enc_provider *enc,
-               krb5_const struct krb5_hash_provider *hash,
+KRB5_PROTOTYPE((const struct krb5_enc_provider *enc,
+               const struct krb5_hash_provider *hash,
                size_t input, size_t *length));
 
 krb5_error_code krb5_marc_dk_encrypt
-KRB5_PROTOTYPE((krb5_const struct krb5_enc_provider *enc,
-               krb5_const struct krb5_hash_provider *hash,
-               krb5_const krb5_keyblock *key, krb5_keyusage usage,
-               krb5_const krb5_data *ivec,
-               krb5_const krb5_data *input, krb5_data *output));
+KRB5_PROTOTYPE((const struct krb5_enc_provider *enc,
+               const struct krb5_hash_provider *hash,
+               const krb5_keyblock *key, krb5_keyusage usage,
+               const krb5_data *ivec,
+               const krb5_data *input, krb5_data *output));
 
 krb5_error_code krb5_marc_dk_decrypt
-KRB5_PROTOTYPE((krb5_const struct krb5_enc_provider *enc,
-               krb5_const struct krb5_hash_provider *hash,
-               krb5_const krb5_keyblock *key, krb5_keyusage usage,
-               krb5_const krb5_data *ivec, krb5_const krb5_data *input,
+KRB5_PROTOTYPE((const struct krb5_enc_provider *enc,
+               const struct krb5_hash_provider *hash,
+               const krb5_keyblock *key, krb5_keyusage usage,
+               const krb5_data *ivec, const krb5_data *input,
                krb5_data *arg_output));
 
 krb5_error_code krb5_marc_dk_make_checksum
-KRB5_PROTOTYPE((krb5_const struct krb5_hash_provider *hash,
-               krb5_const krb5_keyblock *key, krb5_keyusage usage,
-               krb5_const krb5_data *input, krb5_data *output));
+KRB5_PROTOTYPE((const struct krb5_hash_provider *hash,
+               const krb5_keyblock *key, krb5_keyusage usage,
+               const krb5_data *input, krb5_data *output));
 #endif /* ATHENA_DES3_KLUDGE */
index d6e7c0db304b37ffac19a7aa200b942c2e4e5d3c..cd43c09a8c8304c8083273d67f4455e8fd038cd0 100644 (file)
 
 krb5_error_code
 krb5_dk_decrypt(enc, hash, key, usage, ivec, input, output)
-     krb5_const struct krb5_enc_provider *enc;
-     krb5_const struct krb5_hash_provider *hash;
-     krb5_const krb5_keyblock *key;
+     const struct krb5_enc_provider *enc;
+     const struct krb5_hash_provider *hash;
+     const krb5_keyblock *key;
      krb5_keyusage usage;
-     krb5_const krb5_data *ivec;
-     krb5_const krb5_data *input;
+     const krb5_data *ivec;
+     const krb5_data *input;
      krb5_data *output;
 {
     krb5_error_code ret;
@@ -161,12 +161,12 @@ cleanup:
 #ifdef ATHENA_DES3_KLUDGE
 krb5_error_code
 krb5_marc_dk_decrypt(enc, hash, key, usage, ivec, input, output)
-     krb5_const struct krb5_enc_provider *enc;
-     krb5_const struct krb5_hash_provider *hash;
-     krb5_const krb5_keyblock *key;
+     const struct krb5_enc_provider *enc;
+     const struct krb5_hash_provider *hash;
+     const krb5_keyblock *key;
      krb5_keyusage usage;
-     krb5_const krb5_data *ivec;
-     krb5_const krb5_data *input;
+     const krb5_data *ivec;
+     const krb5_data *input;
      krb5_data *output;
 {
     krb5_error_code ret;
index 2bc2b6ba421202ac49f061bba8f81e2de79dcfcb..eb9fe5fa37ebb1b82120512693f29afae7a3264b 100644 (file)
@@ -38,8 +38,8 @@
 
 void
 krb5_dk_encrypt_length(enc, hash, inputlen, length)
-     krb5_const struct krb5_enc_provider *enc;
-     krb5_const struct krb5_hash_provider *hash;
+     const struct krb5_enc_provider *enc;
+     const struct krb5_hash_provider *hash;
      size_t inputlen;
      size_t *length;
 {
@@ -53,12 +53,12 @@ krb5_dk_encrypt_length(enc, hash, inputlen, length)
 
 krb5_error_code
 krb5_dk_encrypt(enc, hash, key, usage, ivec, input, output)
-     krb5_const struct krb5_enc_provider *enc;
-     krb5_const struct krb5_hash_provider *hash;
-     krb5_const krb5_keyblock *key;
+     const struct krb5_enc_provider *enc;
+     const struct krb5_hash_provider *hash;
+     const krb5_keyblock *key;
      krb5_keyusage usage;
-     krb5_const krb5_data *ivec;
-     krb5_const krb5_data *input;
+     const krb5_data *ivec;
+     const krb5_data *input;
      krb5_data *output;
 {
     size_t blocksize, keybytes, keylength, plainlen, enclen;
@@ -180,8 +180,8 @@ cleanup:
 #ifdef ATHENA_DES3_KLUDGE
 void
 krb5_marc_dk_encrypt_length(enc, hash, inputlen, length)
-     krb5_const struct krb5_enc_provider *enc;
-     krb5_const struct krb5_hash_provider *hash;
+     const struct krb5_enc_provider *enc;
+     const struct krb5_hash_provider *hash;
      size_t inputlen;
      size_t *length;
 {
@@ -195,12 +195,12 @@ krb5_marc_dk_encrypt_length(enc, hash, inputlen, length)
 
 krb5_error_code
 krb5_marc_dk_encrypt(enc, hash, key, usage, ivec, input, output)
-     krb5_const struct krb5_enc_provider *enc;
-     krb5_const struct krb5_hash_provider *hash;
-     krb5_const krb5_keyblock *key;
+     const struct krb5_enc_provider *enc;
+     const struct krb5_hash_provider *hash;
+     const krb5_keyblock *key;
      krb5_keyusage usage;
-     krb5_const krb5_data *ivec;
-     krb5_const krb5_data *input;
+     const krb5_data *ivec;
+     const krb5_data *input;
      krb5_data *output;
 {
     size_t blocksize, keybytes, keylength, plainlen, enclen;
index 549a2e178203d61a267cffa2b496cf4f703f18a0..1bbbe5731873e85bf20e28dee47151831375be7e 100644 (file)
@@ -31,9 +31,9 @@ static const unsigned char kerberos[] = "kerberos";
 
 krb5_error_code
 krb5_dk_string_to_key(enc, string, salt, key)
-     krb5_const struct krb5_enc_provider *enc;
-     krb5_const krb5_data *string;
-     krb5_const krb5_data *salt;
+     const struct krb5_enc_provider *enc;
+     const krb5_data *string;
+     const krb5_data *salt;
      krb5_keyblock *key;
 {
     krb5_error_code ret;
index f95a62210b9af15bfb5dcbf85da6d11c934edd7f..6b504648edd0ba4837cbe1a795dade58c9bae8ba 100644 (file)
@@ -1,3 +1,7 @@
+2001-03-05  Ken Raeburn  <raeburn@mit.edu>
+
+       * des.c, des3.c: Use const instead of krb5_const.
+
 2000-06-28  Ezra Peisach  <epeisach@mit.edu>
 
        * des.c, des3.c: Remove unused variables.
index d4cc729a600b928d3c2308e61855de9e852214d8..3560a06b1dabc2c614c3de53b78d1f1ef8d0c53b 100644 (file)
@@ -44,8 +44,8 @@ k5_des_keysize(size_t *keybytes, size_t *keylength)
 }
 
 static krb5_error_code
-k5_des_docrypt(krb5_const krb5_keyblock *key, krb5_const krb5_data *ivec,
-              krb5_const krb5_data *input, krb5_data *output, int encrypt)
+k5_des_docrypt(const krb5_keyblock *key, const krb5_data *ivec,
+              const krb5_data *input, krb5_data *output, int encrypt)
 {
     mit_des_key_schedule schedule;
 
@@ -80,21 +80,21 @@ k5_des_docrypt(krb5_const krb5_keyblock *key, krb5_const krb5_data *ivec,
 }
 
 static krb5_error_code
-k5_des_encrypt(krb5_const krb5_keyblock *key, krb5_const krb5_data *ivec,
-              krb5_const krb5_data *input, krb5_data *output)
+k5_des_encrypt(const krb5_keyblock *key, const krb5_data *ivec,
+              const krb5_data *input, krb5_data *output)
 {
     return(k5_des_docrypt(key, ivec, input, output, 1));
 }
 
 static krb5_error_code
-k5_des_decrypt(krb5_const krb5_keyblock *key, krb5_const krb5_data *ivec,
-              krb5_const krb5_data *input, krb5_data *output)
+k5_des_decrypt(const krb5_keyblock *key, const krb5_data *ivec,
+              const krb5_data *input, krb5_data *output)
 {
     return(k5_des_docrypt(key, ivec, input, output, 0));
 }
 
 static krb5_error_code
-k5_des_make_key(krb5_const krb5_data *randombits, krb5_keyblock *key)
+k5_des_make_key(const krb5_data *randombits, krb5_keyblock *key)
 {
     if (key->length != 8)
        return(KRB5_BAD_KEYSIZE);
index 92b5491d1174034b9af99080d3ca051ae2706ae0..9631be395fa895745ccab50e6418c0cef2519585 100644 (file)
@@ -43,8 +43,8 @@ k5_des3_keysize(size_t *keybytes, size_t *keylength)
 }
 
 static krb5_error_code
-k5_des3_docrypt(krb5_const krb5_keyblock *key, krb5_const krb5_data *ivec,
-               krb5_const krb5_data *input, krb5_data *output, int encrypt)
+k5_des3_docrypt(const krb5_keyblock *key, const krb5_data *ivec,
+               const krb5_data *input, krb5_data *output, int encrypt)
 {
     mit_des3_key_schedule schedule;
 
@@ -81,21 +81,21 @@ k5_des3_docrypt(krb5_const krb5_keyblock *key, krb5_const krb5_data *ivec,
 }
 
 static krb5_error_code
-k5_des3_encrypt(krb5_const krb5_keyblock *key, krb5_const krb5_data *ivec,
-               krb5_const krb5_data *input, krb5_data *output)
+k5_des3_encrypt(const krb5_keyblock *key, const krb5_data *ivec,
+               const krb5_data *input, krb5_data *output)
 {
     return(k5_des3_docrypt(key, ivec, input, output, 1));
 }
 
 static krb5_error_code
-k5_des3_decrypt(krb5_const krb5_keyblock *key, krb5_const krb5_data *ivec,
-               krb5_const krb5_data *input, krb5_data *output)
+k5_des3_decrypt(const krb5_keyblock *key, const krb5_data *ivec,
+               const krb5_data *input, krb5_data *output)
 {
     return(k5_des3_docrypt(key, ivec, input, output, 0));
 }
 
 static krb5_error_code
-k5_des3_make_key(krb5_const krb5_data *randombits, krb5_keyblock *key)
+k5_des3_make_key(const krb5_data *randombits, krb5_keyblock *key)
 {
     int i;
 
index 76b8c840318ea9e50d2c86d2756b0731998fc524..2a3a0eda08fc720703ff5301d454f8013751c97b 100644 (file)
 KRB5_DLLIMP krb5_error_code KRB5_CALLCONV
 krb5_c_encrypt(context, key, usage, ivec, input, output)
      krb5_context context;
-     krb5_const krb5_keyblock *key;
+     const krb5_keyblock *key;
      krb5_keyusage usage;
-     krb5_const krb5_data *ivec;
-     krb5_const krb5_data *input;
+     const krb5_data *ivec;
+     const krb5_data *input;
      krb5_enc_data *output;
 {
     int i;
index 146b003b1a9a596f1dd524e508ac088d77efb63c..9669a725b0368e297024cc8a89f887d6a316a98d 100644 (file)
@@ -1,3 +1,8 @@
+2001-03-05  Ken Raeburn  <raeburn@mit.edu>
+
+       * hash_crc32.c, hash_md4.c, hash_md5.c, hash_sha1.c: Use const
+       instead of krb5_const.
+
 2000-10-17  Ezra Peisach  <epeisach@mit.edu>
 
        * hash_sha1.c (k5_sha1_hash): Cast length field in shsUpdate call
index 4606ba2b5fce092ed94eb2e5ddf8f18e0d8cdcdb..1d8e28ec860bb12d195234a974e882b034f9a649 100644 (file)
@@ -41,7 +41,7 @@ k5_crc32_block_size(size_t *output)
 }
 
 static krb5_error_code
-k5_crc32_hash(unsigned int icount, krb5_const krb5_data *input,
+k5_crc32_hash(unsigned int icount, const krb5_data *input,
              krb5_data *output)
 {
     unsigned long c, cn;
index 09afa53ad3d9464fd8192321524c3257a596ee21..2a3f2782668e25be74329103a906954c3e58be1c 100644 (file)
@@ -41,7 +41,7 @@ k5_md4_block_size(size_t *output)
 }
 
 static krb5_error_code
-k5_md4_hash(unsigned int icount, krb5_const krb5_data *input,
+k5_md4_hash(unsigned int icount, const krb5_data *input,
            krb5_data *output)
 {
     krb5_MD4_CTX ctx;
index c030cbfa117cb5458f6ca022fc5d6d47a47edb3c..e3375d08d203442762645182f50b965e34618ec4 100644 (file)
@@ -41,7 +41,7 @@ k5_md5_block_size(size_t *output)
 }
 
 static krb5_error_code
-k5_md5_hash(unsigned int icount, krb5_const krb5_data *input,
+k5_md5_hash(unsigned int icount, const krb5_data *input,
            krb5_data *output)
 {
     krb5_MD5_CTX ctx;
index 2c215456b580161225972d6c7501c2c9e651796e..ad3765fc1fef40fb052d098cef35fc64c1effd3f 100644 (file)
@@ -41,7 +41,7 @@ k5_sha1_block_size(size_t *output)
 }
 
 static krb5_error_code
-k5_sha1_hash(unsigned int icount, krb5_const krb5_data *input,
+k5_sha1_hash(unsigned int icount, const krb5_data *input,
             krb5_data *output)
 {
     SHS_INFO ctx;
index 013e4eeae439f70b3fdbfa768c2adc9f6885fa34..0b856b4ce9ccadb1c0fa1395a9fc66643c833f49 100644 (file)
 
 krb5_error_code
 krb5_hmac(hash, key, icount, input, output)
-     krb5_const struct krb5_hash_provider *hash;
-     krb5_const krb5_keyblock *key;
+     const struct krb5_hash_provider *hash;
+     const krb5_keyblock *key;
      unsigned int icount;
-     krb5_const krb5_data *input;
+     const krb5_data *input;
      krb5_data *output;
 {
     size_t hashsize, blocksize;
index 92b15c31e332e1189967ea517a7a74fd16f0d597..3860fe446d27342d999d72d831934945d11668e1 100644 (file)
@@ -1,3 +1,8 @@
+2001-03-05  Ken Raeburn  <raeburn@mit.edu>
+
+       * descbc.c, k5_md4des.c, k5_md5des.c: Use const instead of
+       krb5_const.
+
 2000-09-25  Ezra Peisach  <epeisach@mit.edu>
 
        * descbc.c, k5_md4des.c, k5_md5des.c, t_cksum.c: Cleanup unsigned
index 53a0e47f95b44f1f8dee3e652a659240747f054c..b1dfc4651624d78bd1bf2c5661b3e1a3625f423f 100644 (file)
@@ -37,8 +37,8 @@ k5_descbc_hash_size(size_t *output)
 }
 
 static krb5_error_code
-k5_descbc_hash(krb5_const krb5_keyblock *key, krb5_const krb5_data *ivec,
-              krb5_const krb5_data *input, krb5_data *output)
+k5_descbc_hash(const krb5_keyblock *key, const krb5_data *ivec,
+              const krb5_data *input, krb5_data *output)
 {
     mit_des_key_schedule schedule;
 
index 360a81009fe3d09ca273eaf352a6d984644f8815..b91b472aca9c33b0d2ef0ae85b1906dc70f25fc5 100644 (file)
@@ -48,8 +48,8 @@ k5_md4des_hash_size(size_t *output)
    that's less efficient, and there's no need for this to be generic */
 
 static krb5_error_code
-k5_md4des_hash(krb5_const krb5_keyblock *key, krb5_const krb5_data *ivec,
-              krb5_const krb5_data *input, krb5_data *output)
+k5_md4des_hash(const krb5_keyblock *key, const krb5_data *ivec,
+              const krb5_data *input, krb5_data *output)
 {
     krb5_error_code ret;
     krb5_data data;
@@ -110,8 +110,8 @@ k5_md4des_hash(krb5_const krb5_keyblock *key, krb5_const krb5_data *ivec,
 }
 
 static krb5_error_code
-k5_md4des_verify(krb5_const krb5_keyblock *key, krb5_const krb5_data *ivec,
-                krb5_const krb5_data *input, krb5_const krb5_data *hash,
+k5_md4des_verify(const krb5_keyblock *key, const krb5_data *ivec,
+                const krb5_data *input, const krb5_data *hash,
                 krb5_boolean *valid)
 {
     krb5_error_code ret;
index bf9e5f7be4a020c9c031135ef5da18cd04e3a97e..e628a12627d4aa0b379666f022abe82a93203bf8 100644 (file)
@@ -48,8 +48,8 @@ k5_md5des_hash_size(size_t *output)
    that's less efficient, and there's no need for this to be generic */
 
 static krb5_error_code
-k5_md5des_hash(krb5_const krb5_keyblock *key, krb5_const krb5_data *ivec,
-              krb5_const krb5_data *input, krb5_data *output)
+k5_md5des_hash(const krb5_keyblock *key, const krb5_data *ivec,
+              const krb5_data *input, krb5_data *output)
 {
     krb5_error_code ret;
     krb5_data data;
@@ -110,8 +110,8 @@ k5_md5des_hash(krb5_const krb5_keyblock *key, krb5_const krb5_data *ivec,
 }
 
 static krb5_error_code
-k5_md5des_verify(krb5_const krb5_keyblock *key, krb5_const krb5_data *ivec,
-                krb5_const krb5_data *input, krb5_const krb5_data *hash,
+k5_md5des_verify(const krb5_keyblock *key, const krb5_data *ivec,
+                const krb5_data *input, const krb5_data *hash,
                 krb5_boolean *valid)
 {
     krb5_error_code ret;
index 64f63894c19aa8d7fb6f956b4fe58a1e790bb658..afd512533427110175f3bee48f8976027ae01589 100644 (file)
@@ -33,9 +33,9 @@ KRB5_DLLIMP krb5_error_code KRB5_CALLCONV
 krb5_c_make_checksum(context, cksumtype, key, usage, input, cksum)
      krb5_context context;
      krb5_cksumtype cksumtype;
-     krb5_const krb5_keyblock *key;
+     const krb5_keyblock *key;
      krb5_keyusage usage;
-     krb5_const krb5_data *input;
+     const krb5_data *input;
      krb5_checksum *cksum;
 {
     int i, e1, e2;
index d9bc804a151618a8efc082d1952bea226a892e53..937f09669ce43789e852da9d80d187fb3fc1917e 100644 (file)
@@ -48,7 +48,7 @@ n-fold(k-bits):
 void
 krb5_nfold(inbits, in, outbits, out)
      unsigned int inbits;
-     krb5_const unsigned char *in;
+     const unsigned char *in;
      unsigned int outbits;
      unsigned char *out;
 {
index 7446daa2c0f02600b22c371c3cf110ad5d6f9cd6..b859386af8b9185df1c8e84fe635cf5d270001a5 100644 (file)
@@ -1,3 +1,8 @@
+2001-03-05  Ken Raeburn  <raeburn@mit.edu>
+
+       * des_stringtokey.c, old.h, old_decrypt.c, old_encrypt.c: Use
+       const instead of krb5_const.
+
 2000-06-03  Tom Yu  <tlyu@mit.edu>
 
        * old_encrypt.c (krb5_old_encrypt): Chain ivecs.
index 8aaac792e2e4cae5fde5fadb3de42ea9f32b525a..3369442bcfc28978468b4a9069947bdb3270903d 100644 (file)
@@ -35,9 +35,9 @@ KRB5_PROTOTYPE ((krb5_keyblock FAR * keyblock,
 
 krb5_error_code
 krb5_des_string_to_key(enc, string, salt, key)
-     krb5_const struct krb5_enc_provider *enc;
-     krb5_const krb5_data *string;
-     krb5_const krb5_data *salt;
+     const struct krb5_enc_provider *enc;
+     const krb5_data *string;
+     const krb5_data *salt;
      krb5_keyblock *key;
 {
     return(mit_des_string_to_key_int(key, string, salt));
index 9c7abc2fa2cbcf037cce9b778a9d1d4a4900f48e..a0523254ec9ff011a5b8b1f78bd8ccefea570865 100644 (file)
 #include "k5-int.h"
 
 void krb5_old_encrypt_length
-KRB5_PROTOTYPE((krb5_const struct krb5_enc_provider *enc,
-               krb5_const struct krb5_hash_provider *hash,
+KRB5_PROTOTYPE((const struct krb5_enc_provider *enc,
+               const struct krb5_hash_provider *hash,
                size_t input, size_t *length));
 
 krb5_error_code krb5_old_encrypt
-KRB5_PROTOTYPE((krb5_const struct krb5_enc_provider *enc,
-               krb5_const struct krb5_hash_provider *hash,
-               krb5_const krb5_keyblock *key, krb5_keyusage usage,
-               krb5_const krb5_data *ivec, krb5_const krb5_data *input,
+KRB5_PROTOTYPE((const struct krb5_enc_provider *enc,
+               const struct krb5_hash_provider *hash,
+               const krb5_keyblock *key, krb5_keyusage usage,
+               const krb5_data *ivec, const krb5_data *input,
                krb5_data *output));
 
 krb5_error_code krb5_old_decrypt
-KRB5_PROTOTYPE((krb5_const struct krb5_enc_provider *enc,
-               krb5_const struct krb5_hash_provider *hash,
-               krb5_const krb5_keyblock *key, krb5_keyusage usage,
-               krb5_const krb5_data *ivec, krb5_const krb5_data *input,
+KRB5_PROTOTYPE((const struct krb5_enc_provider *enc,
+               const struct krb5_hash_provider *hash,
+               const krb5_keyblock *key, krb5_keyusage usage,
+               const krb5_data *ivec, const krb5_data *input,
                krb5_data *arg_output));
 
 krb5_error_code krb5_des_string_to_key
-KRB5_PROTOTYPE((krb5_const struct krb5_enc_provider *enc,
-               krb5_const krb5_data *string, krb5_const krb5_data *salt, 
+KRB5_PROTOTYPE((const struct krb5_enc_provider *enc,
+               const krb5_data *string, const krb5_data *salt, 
                krb5_keyblock *key));
index bfbe56a109dd079c4e11c593f61b92e71c67d6e6..6606be754f31a39101889a59ccbf5fb0cedf9de0 100644 (file)
 
 krb5_error_code
 krb5_old_decrypt(enc, hash, key, usage, ivec, input, arg_output)
-     krb5_const struct krb5_enc_provider *enc;
-     krb5_const struct krb5_hash_provider *hash;
-     krb5_const krb5_keyblock *key;
+     const struct krb5_enc_provider *enc;
+     const struct krb5_hash_provider *hash;
+     const krb5_keyblock *key;
      krb5_keyusage usage;
-     krb5_const krb5_data *ivec;
-     krb5_const krb5_data *input;
+     const krb5_data *ivec;
+     const krb5_data *input;
      krb5_data *arg_output;
 {
     krb5_error_code ret;
index 8860ba5ff99af8baf029c5f1736a6595b2c04955..374bbad082bbedfa3841b008690e52f1bdbc3544 100644 (file)
@@ -29,8 +29,8 @@
 
 void
 krb5_old_encrypt_length(enc, hash, inputlen, length)
-     krb5_const struct krb5_enc_provider *enc;
-     krb5_const struct krb5_hash_provider *hash;
+     const struct krb5_enc_provider *enc;
+     const struct krb5_hash_provider *hash;
      size_t inputlen;
      size_t *length;
 {
@@ -44,12 +44,12 @@ krb5_old_encrypt_length(enc, hash, inputlen, length)
 
 krb5_error_code
 krb5_old_encrypt(enc, hash, key, usage, ivec, input, output)
-     krb5_const struct krb5_enc_provider *enc;
-     krb5_const struct krb5_hash_provider *hash;
-     krb5_const krb5_keyblock *key;
+     const struct krb5_enc_provider *enc;
+     const struct krb5_hash_provider *hash;
+     const krb5_keyblock *key;
      krb5_keyusage usage;
-     krb5_const krb5_data *ivec;
-     krb5_const krb5_data *input;
+     const krb5_data *ivec;
+     const krb5_data *input;
      krb5_data *output;
 {
     krb5_error_code ret;
index 429307e6f47b9248675ae31e277ab52e9d0d2514..16b6b1e8e53037e9ce235df2ea907718b12e0f4a 100644 (file)
@@ -29,9 +29,9 @@
 KRB5_DLLIMP krb5_error_code KRB5_CALLCONV
 krb5_encrypt(context, inptr, outptr, size, eblock, ivec)
      krb5_context context;
-     krb5_const krb5_pointer inptr;
+     const krb5_pointer inptr;
      krb5_pointer outptr;
-     krb5_const size_t size;
+     const size_t size;
      krb5_encrypt_block FAR * eblock;
      krb5_pointer ivec;
 {
@@ -68,9 +68,9 @@ krb5_encrypt(context, inptr, outptr, size, eblock, ivec)
 KRB5_DLLIMP krb5_error_code KRB5_CALLCONV
 krb5_decrypt(context, inptr, outptr, size, eblock, ivec)
      krb5_context context;
-     krb5_const krb5_pointer inptr;
+     const krb5_pointer inptr;
      krb5_pointer outptr;
-     krb5_const size_t size;
+     const size_t size;
      krb5_encrypt_block FAR * eblock;
      krb5_pointer ivec;
 {
@@ -106,7 +106,7 @@ KRB5_DLLIMP krb5_error_code KRB5_CALLCONV
 krb5_process_key(context, eblock, key)
      krb5_context context;
      krb5_encrypt_block FAR * eblock;
-     krb5_const krb5_keyblock FAR * key;
+     const krb5_keyblock FAR * key;
 {
     eblock->key = (krb5_keyblock *) key;
 
@@ -124,10 +124,10 @@ krb5_finish_key(context, eblock)
 KRB5_DLLIMP krb5_error_code KRB5_CALLCONV
 krb5_string_to_key(context, eblock, keyblock, data, salt)
      krb5_context context;
-     krb5_const krb5_encrypt_block FAR * eblock;
+     const krb5_encrypt_block FAR * eblock;
      krb5_keyblock FAR * keyblock;
-     krb5_const krb5_data FAR * data;
-     krb5_const krb5_data FAR * salt;
+     const krb5_data FAR * data;
+     const krb5_data FAR * salt;
 {
     return(krb5_c_string_to_key(context, eblock->crypto_entry, data, salt,
                                keyblock));
@@ -136,8 +136,8 @@ krb5_string_to_key(context, eblock, keyblock, data, salt)
 KRB5_DLLIMP krb5_error_code KRB5_CALLCONV
 krb5_init_random_key(context, eblock, keyblock, ptr)
      krb5_context context;
-     krb5_const krb5_encrypt_block FAR * eblock;
-     krb5_const krb5_keyblock FAR * keyblock;
+     const krb5_encrypt_block FAR * eblock;
+     const krb5_keyblock FAR * keyblock;
      krb5_pointer FAR * ptr;
 {
     krb5_data data;
@@ -151,7 +151,7 @@ krb5_init_random_key(context, eblock, keyblock, ptr)
 KRB5_DLLIMP krb5_error_code KRB5_CALLCONV
 krb5_finish_random_key(context, eblock, ptr)
      krb5_context context;
-     krb5_const krb5_encrypt_block FAR * eblock;
+     const krb5_encrypt_block FAR * eblock;
      krb5_pointer FAR * ptr;
 {
     return(0);
@@ -160,7 +160,7 @@ krb5_finish_random_key(context, eblock, ptr)
 KRB5_DLLIMP krb5_error_code KRB5_CALLCONV
 krb5_random_key(context, eblock, ptr, keyblock)
      krb5_context context;
-     krb5_const krb5_encrypt_block FAR * eblock;
+     const krb5_encrypt_block FAR * eblock;
      krb5_pointer ptr;
      krb5_keyblock FAR * FAR * keyblock;
 {
@@ -181,7 +181,7 @@ krb5_random_key(context, eblock, ptr, keyblock)
 KRB5_DLLIMP krb5_enctype KRB5_CALLCONV
 krb5_eblock_enctype(context, eblock)
      krb5_context context;
-     krb5_const krb5_encrypt_block FAR * eblock;
+     const krb5_encrypt_block FAR * eblock;
 {
     return(eblock->crypto_entry);
 }
@@ -190,7 +190,7 @@ KRB5_DLLIMP krb5_error_code KRB5_CALLCONV
 krb5_use_enctype(context, eblock, enctype)
      krb5_context context;
      krb5_encrypt_block FAR * eblock;
-     krb5_const krb5_enctype enctype;
+     const krb5_enctype enctype;
 {
     eblock->crypto_entry = enctype;
 
@@ -227,11 +227,11 @@ KRB5_DLLIMP krb5_error_code KRB5_CALLCONV
 krb5_calculate_checksum(context, ctype, in, in_length,
                                        seed, seed_length, outcksum)
      krb5_context context;
-     krb5_const krb5_cksumtype ctype;
-     krb5_const krb5_pointer in;
-     krb5_const size_t in_length;
-     krb5_const krb5_pointer seed;
-     krb5_const size_t seed_length;
+     const krb5_cksumtype ctype;
+     const krb5_pointer in;
+     const size_t in_length;
+     const krb5_pointer seed;
+     const size_t seed_length;
      krb5_checksum FAR * outcksum;
 {
     krb5_data input;
@@ -269,11 +269,11 @@ krb5_verify_checksum(context, ctype, cksum, in, in_length,
                                     seed, seed_length)
      krb5_context context;
      krb5_cksumtype ctype;
-     krb5_const krb5_checksum FAR * cksum;
-     krb5_const krb5_pointer in;
-     krb5_const size_t in_length;
-     krb5_const krb5_pointer seed;
-     krb5_const size_t seed_length;
+     const krb5_checksum FAR * cksum;
+     const krb5_pointer in;
+     const size_t in_length;
+     const krb5_pointer seed;
+     const size_t seed_length;
 {
     krb5_data input;
     krb5_keyblock key;
index f898238f1f8471ee6eede0494f05654f380cb244..bf10d3e49c36040e563bf9887d1c982bedb9d5c6 100644 (file)
@@ -1,3 +1,8 @@
+2001-03-05  Ken Raeburn  <raeburn@mit.edu>
+
+       * raw.h, raw_decrypt.c, raw_encrypt.c: Use const instead of
+       krb5_const.
+
 1999-10-26  Wilfredo Sanchez  <tritan@mit.edu>
 
        * Makefile.in: Clean up usage of CFLAGS, CPPFLAGS, DEFS, DEFINES,
index 5cfeae67ee652c7f2a410b38535090af90607dd0..79c235d28ebe4b4d5e53e0499b3ec00ac9a2c369 100644 (file)
 #include "k5-int.h"
 
 void krb5_raw_encrypt_length
-KRB5_PROTOTYPE((krb5_const struct krb5_enc_provider *enc,
-               krb5_const struct krb5_hash_provider *hash,
+KRB5_PROTOTYPE((const struct krb5_enc_provider *enc,
+               const struct krb5_hash_provider *hash,
                size_t input, size_t *length));
 
 krb5_error_code krb5_raw_encrypt
-KRB5_PROTOTYPE((krb5_const struct krb5_enc_provider *enc,
-               krb5_const struct krb5_hash_provider *hash,
-               krb5_const krb5_keyblock *key, krb5_keyusage usage,
-               krb5_const krb5_data *ivec, krb5_const krb5_data *input,
+KRB5_PROTOTYPE((const struct krb5_enc_provider *enc,
+               const struct krb5_hash_provider *hash,
+               const krb5_keyblock *key, krb5_keyusage usage,
+               const krb5_data *ivec, const krb5_data *input,
                krb5_data *output));
 
 krb5_error_code krb5_raw_decrypt
-KRB5_PROTOTYPE((krb5_const struct krb5_enc_provider *enc,
-               krb5_const struct krb5_hash_provider *hash,
-               krb5_const krb5_keyblock *key, krb5_keyusage usage,
-               krb5_const krb5_data *ivec, krb5_const krb5_data *input,
+KRB5_PROTOTYPE((const struct krb5_enc_provider *enc,
+               const struct krb5_hash_provider *hash,
+               const krb5_keyblock *key, krb5_keyusage usage,
+               const krb5_data *ivec, const krb5_data *input,
                krb5_data *arg_output));
index 2c9c2d7b6e92f15ab22e4c0a91033aff689972fe..9c26968cd0c5f6b0d6592a415ad9a5256efea9f2 100644 (file)
 
 krb5_error_code
 krb5_raw_decrypt(enc, hash, key, usage, ivec, input, output)
-     krb5_const struct krb5_enc_provider *enc;
-     krb5_const struct krb5_hash_provider *hash;
-     krb5_const krb5_keyblock *key;
+     const struct krb5_enc_provider *enc;
+     const struct krb5_hash_provider *hash;
+     const krb5_keyblock *key;
      krb5_keyusage usage;
-     krb5_const krb5_data *ivec;
-     krb5_const krb5_data *input;
+     const krb5_data *ivec;
+     const krb5_data *input;
      krb5_data *output;
 {
     return((*(enc->decrypt))(key, ivec, input, output));
index d1a84ba8cca50e2db66047bce729eea9a84861c9..8505534ec353c261e0ebb490ae897bb9f5cd5378 100644 (file)
@@ -29,8 +29,8 @@
 
 void
 krb5_raw_encrypt_length(enc, hash, inputlen, length)
-     krb5_const struct krb5_enc_provider *enc;
-     krb5_const struct krb5_hash_provider *hash;
+     const struct krb5_enc_provider *enc;
+     const struct krb5_hash_provider *hash;
      size_t inputlen;
      size_t *length;
 {
@@ -43,12 +43,12 @@ krb5_raw_encrypt_length(enc, hash, inputlen, length)
 
 krb5_error_code
 krb5_raw_encrypt(enc, hash, key, usage, ivec, input, output)
-     krb5_const struct krb5_enc_provider *enc;
-     krb5_const struct krb5_hash_provider *hash;
-     krb5_const krb5_keyblock *key;
+     const struct krb5_enc_provider *enc;
+     const struct krb5_hash_provider *hash;
+     const krb5_keyblock *key;
      krb5_keyusage usage;
-     krb5_const krb5_data *ivec;
-     krb5_const krb5_data *input;
+     const krb5_data *ivec;
+     const krb5_data *input;
      krb5_data *output;
 {
     return((*(enc->encrypt))(key, ivec, input, output));
index c9a3d33e9375d15d69a0b93e7853da7be135d7f2..378050800e31ddecad4da88ae870a1fe593ef43b 100644 (file)
@@ -31,8 +31,8 @@ KRB5_DLLIMP krb5_error_code KRB5_CALLCONV
 krb5_c_string_to_key(context, enctype, string, salt, key)
      krb5_context context;
      krb5_enctype enctype;
-     krb5_const krb5_data *string;
-     krb5_const krb5_data *salt;
+     const krb5_data *string;
+     const krb5_data *salt;
      krb5_keyblock *key;
 {
     int i;
index c54007b4041f3df709cef8970d3782b8d1fe6789..3056e50ede73570dc40b8dd79c7960c85e3ed50b 100644 (file)
 KRB5_DLLIMP krb5_error_code KRB5_CALLCONV
 krb5_c_verify_checksum(context, key, usage, data, cksum, valid)
      krb5_context context;
-     krb5_const krb5_keyblock *key;
+     const krb5_keyblock *key;
      krb5_keyusage usage;
-     krb5_const krb5_data *data;
-     krb5_const krb5_checksum *cksum;
+     const krb5_data *data;
+     const krb5_checksum *cksum;
      krb5_boolean *valid;
 {
     int i;