protoize
authorKen Raeburn <raeburn@mit.edu>
Thu, 19 Feb 2004 02:46:30 +0000 (02:46 +0000)
committerKen Raeburn <raeburn@mit.edu>
Thu, 19 Feb 2004 02:46:30 +0000 (02:46 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16102 dc483132-0cff-0310-8789-dd5450dbe970

55 files changed:
src/lib/crypto/ChangeLog
src/lib/crypto/arcfour/ChangeLog
src/lib/crypto/arcfour/arcfour.c
src/lib/crypto/block_size.c
src/lib/crypto/checksum_length.c
src/lib/crypto/cksumtype_to_string.c
src/lib/crypto/coll_proof_cksum.c
src/lib/crypto/crc32/ChangeLog
src/lib/crypto/crc32/crc32.c
src/lib/crypto/decrypt.c
src/lib/crypto/des/ChangeLog
src/lib/crypto/des/afsstring2key.c
src/lib/crypto/des/d3_cbc.c
src/lib/crypto/des/d3_kysched.c
src/lib/crypto/des/f_cbc.c
src/lib/crypto/des/f_cksum.c
src/lib/crypto/des/f_parity.c
src/lib/crypto/des/f_sched.c
src/lib/crypto/des/key_sched.c
src/lib/crypto/des/string2key.c
src/lib/crypto/des/weak_key.c
src/lib/crypto/dk/ChangeLog
src/lib/crypto/dk/checksum.c
src/lib/crypto/dk/derive.c
src/lib/crypto/dk/dk_decrypt.c
src/lib/crypto/dk/dk_encrypt.c
src/lib/crypto/encrypt.c
src/lib/crypto/encrypt_length.c
src/lib/crypto/enctype_compare.c
src/lib/crypto/enctype_to_string.c
src/lib/crypto/hmac.c
src/lib/crypto/keyed_checksum_types.c
src/lib/crypto/keyed_cksum.c
src/lib/crypto/make_checksum.c
src/lib/crypto/make_random_key.c
src/lib/crypto/md4/ChangeLog
src/lib/crypto/md4/md4.c
src/lib/crypto/md5/ChangeLog
src/lib/crypto/md5/md5.c
src/lib/crypto/nfold.c
src/lib/crypto/old/ChangeLog
src/lib/crypto/old/des_stringtokey.c
src/lib/crypto/old_api_glue.c
src/lib/crypto/prng.c
src/lib/crypto/raw/ChangeLog
src/lib/crypto/raw/raw_decrypt.c
src/lib/crypto/raw/raw_encrypt.c
src/lib/crypto/sha1/ChangeLog
src/lib/crypto/sha1/shs.c
src/lib/crypto/string_to_cksumtype.c
src/lib/crypto/string_to_enctype.c
src/lib/crypto/string_to_key.c
src/lib/crypto/valid_cksumtype.c
src/lib/crypto/valid_enctype.c
src/lib/crypto/verify_checksum.c

index 301a5aa5b152d8d07ce3d3a61d5b8bc634ddcc2d..4bd14efbd07c07661784321d580ae1f70cd9eb3b 100644 (file)
@@ -1,3 +1,14 @@
+2004-02-18  Ken Raeburn  <raeburn@mit.edu>
+
+       * block_size.c, checksum_length.c, cksumtype_to_string.c,
+       coll_proof_cksum.c, decrypt.c, encrypt.c, encrypt_length.c,
+       enctype_compare.c, enctype_to_string.c, hmac.c,
+       keyed_checksum_types.c, keyed_cksum.c, make_checksum.c,
+       make_random_key.c, nfold.c, old_api_glue.c, prng.c,
+       string_to_cksumtype.c, string_to_enctype.c, string_to_key.c,
+       valid_cksumtype.c, valid_enctype.c, verify_checksum.c: Use ANSI C
+       style function definitions.
+
 2004-02-13  Ken Raeburn  <raeburn@mit.edu>
 
        * t_encrypt.c (compare_results): New function.
index d15a4fc4d9886286c2825d4fa273256d74c39bad..9e8394710e03731d73f52b2a6dd1f4b7fd77892b 100644 (file)
@@ -1,3 +1,7 @@
+2004-02-18  Ken Raeburn  <raeburn@mit.edu>
+
+       * arcfour.c: Use ANSI C style function definitions.
+
 2003-12-19  Ken Raeburn  <raeburn@mit.edu>
 
        * arcfour.c (l40): Now const.
index e4cf361cd5e9251c6843c6823afe7219a8d69ae2..3481fadcb16239efd2ce52627bdbae3ede8aa2b7 100644 (file)
@@ -11,11 +11,9 @@ of RSA Data Security)
 static const char *const l40 = "fortybits";
 
 void
-krb5_arcfour_encrypt_length(enc, hash, inputlen, length)
-     const struct krb5_enc_provider *enc;
-     const struct krb5_hash_provider *hash;
-     size_t inputlen;
-     size_t *length;
+krb5_arcfour_encrypt_length(const struct krb5_enc_provider *enc,
+                           const struct krb5_hash_provider *hash,
+                           size_t inputlen, size_t *length)
 {
   size_t blocksize, hashsize;
 
@@ -62,14 +60,11 @@ case 7:                             /* tgs-req authenticator */
 }
 
 krb5_error_code
-krb5_arcfour_encrypt(enc, hash, key, usage, ivec, input, output)
-     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_arcfour_encrypt(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_keyblock k1, k2, k3;
   krb5_data d1, d2, d3, salt, plaintext, checksum, ciphertext, confounder;
@@ -191,14 +186,11 @@ krb5_arcfour_encrypt(enc, hash, key, usage, ivec, input, output)
 
 /* This is the arcfour-hmac decryption routine */
 krb5_error_code
-krb5_arcfour_decrypt(enc, hash, key, usage, ivec, input, output)
-     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_arcfour_decrypt(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_keyblock k1,k2,k3;
   krb5_data d1,d2,d3,salt,ciphertext,plaintext,checksum;
index 021f3819be31db8082636d6ec33c2f8319e3ad2f..e4c11e86900f6c1f00351400c5afd1df0a332696 100644 (file)
 #include "etypes.h"
 
 krb5_error_code KRB5_CALLCONV
-krb5_c_block_size(context, enctype, blocksize)
-     krb5_context context;
-     krb5_enctype enctype;
-     size_t *blocksize;
+krb5_c_block_size(krb5_context context, krb5_enctype enctype,
+                 size_t *blocksize)
 {
     int i;
 
index 4a0294c5d514edc53d8ef59d60c687abd397fcb1..16177be09fb9701c6a192162d75d465e7f821955 100644 (file)
 #include "cksumtypes.h"
 
 krb5_error_code KRB5_CALLCONV
-krb5_c_checksum_length(context, cksumtype, length)
-     krb5_context context;
-     krb5_cksumtype cksumtype;
-     size_t *length;
+krb5_c_checksum_length(krb5_context context, krb5_cksumtype cksumtype,
+                      size_t *length)
 {
     int i;
 
index 8c75eaefba3358d75d1839c1a64bff5ae0918b18..b0ac516e20e6c6f6d8ab6aa74a73d1dec6966e74 100644 (file)
 #include "cksumtypes.h"
 
 krb5_error_code KRB5_CALLCONV
-krb5_cksumtype_to_string(cksumtype, buffer, buflen)
-    krb5_cksumtype     cksumtype;
-    char               * buffer;
-    size_t             buflen;
+krb5_cksumtype_to_string(krb5_cksumtype cksumtype, char *buffer, size_t buflen)
 {
     int i;
 
index 0cb3684354c30fedc6f0ec510141650b31dc143a..5c3ea48d34cc1add589d42e03f155cd1fa591507 100644 (file)
@@ -28,8 +28,7 @@
 #include "cksumtypes.h"
 
 krb5_boolean KRB5_CALLCONV
-krb5_c_is_coll_proof_cksum(ctype)
-     krb5_cksumtype ctype;
+krb5_c_is_coll_proof_cksum(krb5_cksumtype ctype)
 {
     int i;
 
index 27b58fa492f3d630d57a32529e58286d93bc7a97..637632a291f1feb5db7b48572b7dd87e4b007103 100644 (file)
@@ -1,3 +1,7 @@
+2004-02-18  Ken Raeburn  <raeburn@mit.edu>
+
+       * crc32.c: Use ANSI C style function definitions.
+
 2003-07-17  Ken Raeburn  <raeburn@mit.edu>
 
        * Makefile.in (LIBNAME) [##WIN16##]: Don't define.
index f23e65ff1b13c2d91c52ccb6c08e71e777272e9e..ef65476d9afe034ce40588c5f08ec6cb1c134bf6 100644 (file)
@@ -147,10 +147,7 @@ static u_long const crc_table[256] = {
     };
 
 void
-mit_crc32(in, in_length, cksum)
-    const krb5_pointer in;
-    const size_t in_length;
-    unsigned long *cksum;
+mit_crc32(krb5_pointer in, size_t in_length, unsigned long *cksum)
 {
     register u_char *data;
     register u_long c = 0;
@@ -177,10 +174,7 @@ static unsigned long const tbl4[16] = {
 };
 
 void
-mit_crc32_shift4(in, in_length, cksum)
-    const krb5_pointer in;
-    const size_t in_length;
-    unsigned long *cksum;
+mit_crc32_shift4(krb5_pointer in, size_t in_length, unsigned long *cksum)
 {
     register unsigned char *data, b;
     register unsigned long c = 0;
index 04a51065c9d3520e20e419aeb4c70239aa8c8662..c252eb7c22bdea6cc72dda3111133f3fc45f0812 100644 (file)
 #include "etypes.h"
 
 krb5_error_code KRB5_CALLCONV
-krb5_c_decrypt(context, key, usage, ivec, input, output)
-     krb5_context context;
-     const krb5_keyblock *key;
-     krb5_keyusage usage;
-     const krb5_data *ivec;
-     const krb5_enc_data *input;
-     krb5_data *output;
+krb5_c_decrypt(krb5_context context, const krb5_keyblock *key,
+              krb5_keyusage usage, const krb5_data *ivec,
+              const krb5_enc_data *input, krb5_data *output)
 {
     int i;
 
index 0e469642d540421edf5faa426fbd672b4b6cf921..409e09b34a8ab11dd43dc7353ccfa0c936b1ba45 100644 (file)
@@ -1,3 +1,9 @@
+2004-02-18  Ken Raeburn  <raeburn@mit.edu>
+
+       * afsstring2key.c, d3_cbc.c, d3_kysched.c, f_cbc.c, f_cksum.c,
+       f_parity.c, f_sched.c, key_sched.c, string2key.c, weak_key.c: Use
+       ANSI C style function definitions.
+
 2004-02-17  Ken Raeburn  <raeburn@mit.edu>
 
        * f_tables.h (DES_DO_ENCRYPT, DES_DO_DECRYPT): Allocate temporary
index 264414b760e114e5d5764047191daa6a9ea4fbc1..97ec2d8a1e68b55b17af3abe4cba88c1ab1647f8 100644 (file)
@@ -68,10 +68,8 @@ char *afs_crypt (const char *, const char *, char *);
 #define min(a,b) ((a)>(b)?(b):(a))
 
 krb5_error_code
-mit_afs_string_to_key (keyblock, data, salt)
-     krb5_keyblock * keyblock;
-     const krb5_data * data;
-     const krb5_data * salt;
+mit_afs_string_to_key (krb5_keyblock *keyblock, const krb5_data *data,
+                      const krb5_data *salt)
 {
   /* totally different approach from MIT string2key. */
   /* much of the work has already been done by the only caller 
@@ -338,10 +336,9 @@ static const char  S[8][64] = {
 };
  
  
-char *afs_crypt(pw, salt, iobuf)
-     const char *pw;
-     const char *salt;
-     char *iobuf;              /* must be at least 16 bytes */
+char *afs_crypt(const char *pw, const char *salt,
+               /* must be at least 16 bytes */
+               char *iobuf)
 {
        int i, j, c;
        int temp;
@@ -405,9 +402,7 @@ char *afs_crypt(pw, salt, iobuf)
  * Set up the key schedule from the key.
  */
  
-static void krb5_afs_crypt_setkey(key, E, KS)
-     char *key;
-     char *E, (*KS)[48];
+static void krb5_afs_crypt_setkey(char *key, char *E, char (*KS)[48])
 {
        register int i, j, k;
        int t;
@@ -467,9 +462,7 @@ static void krb5_afs_crypt_setkey(key, E, KS)
  * The payoff: encrypt a block.
  */
  
-static void krb5_afs_encrypt(block, E, KS)
-     char *block;
-     char *E, (*KS)[48];
+static void krb5_afs_encrypt(char *block, char *E, char (*KS)[48])
 {
        const long edflag = 0;
        int i, ii;
index c49c6eafbd9551138355ac493669e77fc9f0f1c7..3ff1c1186ac5a9d60769c9b9b5cd5a6a97d85d5d 100644 (file)
 
 #undef mit_des3_cbc_encrypt
 int
-mit_des3_cbc_encrypt(in, out, length, ks1, ks2, ks3, ivec, enc)
-       const mit_des_cblock *in;
-       mit_des_cblock *out;
-       unsigned long length;
-       const mit_des_key_schedule ks1, ks2, ks3;
-       const mit_des_cblock ivec;
-       int enc;
+mit_des3_cbc_encrypt(const mit_des_cblock *in, mit_des_cblock *out,
+                    unsigned long length, const mit_des_key_schedule ks1,
+                    const mit_des_key_schedule ks2,
+                    const mit_des_key_schedule ks3,
+                    const mit_des_cblock ivec, int enc)
 {
     if (enc)
        krb5int_des3_cbc_encrypt(in, out, length, ks1, ks2, ks3, ivec);
index 2bc93a9a26292c2743cbf56a6d20ec4aa80752b7..f18cc24194becf487179eecfa937a475f88da3e7 100644 (file)
@@ -24,9 +24,7 @@
 #include "des_int.h"
 
 int
-mit_des3_key_sched(k,schedule)
-    mit_des3_cblock k;
-    mit_des3_key_schedule schedule;
+mit_des3_key_sched(mit_des3_cblock k, mit_des3_key_schedule schedule)
 {
     mit_des_make_key_sched(k[0],schedule[0]);
     mit_des_make_key_sched(k[1],schedule[1]);
index aa15fefed47c56056fa192402e0c29b3df7d5682..3dfb99724af8757a49f5da9ab5a1b73239644f01 100644 (file)
@@ -40,13 +40,9 @@ 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)
-       const mit_des_cblock *in;
-       mit_des_cblock *out;
-       unsigned long length;
-       const mit_des_key_schedule schedule;
-       const mit_des_cblock ivec;
-       int enc;
+mit_des_cbc_encrypt(const mit_des_cblock *in, mit_des_cblock *out,
+                   unsigned long length, const mit_des_key_schedule schedule,
+                   const mit_des_cblock ivec, int enc)
 {
     /*
      * Deal with encryption and decryption separately.
index 781a1f4fa15ba719f4703330de746c8bdfd47e7b..0e9ebf3f4c0ab9a38931d819a79ee84e7891342f 100644 (file)
  */
 
 unsigned long
-mit_des_cbc_cksum(in, out, length, schedule, ivec)
-       const krb5_octet *in;
-       krb5_octet *out;
-       unsigned long length;
-       const mit_des_key_schedule schedule;
-       const krb5_octet *ivec;
+mit_des_cbc_cksum(const krb5_octet *in, krb5_octet *out,
+                 unsigned long length, const mit_des_key_schedule schedule,
+                 const krb5_octet *ivec)
 {
        register unsigned DES_INT32 left, right;
        const unsigned DES_INT32 *kp;
index e68bdd6296625654a272bf49936d66fa8e2dd8bb..26cf6039b4280aec3d764e8fb57010801ebfba00 100644 (file)
@@ -21,8 +21,7 @@
 #define parity_char(x) pstep(pstep(pstep((x),4),2),1)
 
 void
-mit_des_fixup_key_parity(key)
-     register mit_des_cblock key;
+mit_des_fixup_key_parity(mit_des_cblock key)
 {
     int i;
     for (i=0; i<sizeof(mit_des_cblock); i++) 
@@ -40,8 +39,7 @@ mit_des_fixup_key_parity(key)
  *                       correct des parity.
  */
 int
-mit_des_check_key_parity(key)
-     register mit_des_cblock key;
+mit_des_check_key_parity(mit_des_cblock key)
 {
     int i;
     
index a3b1bf0e4cd9ee1bff15fd816e2affe117c15ade..99d1dc31335583d0e92a3d19ce1e31a9cbec982c 100644 (file)
@@ -220,9 +220,7 @@ static const unsigned DES_INT32 PC2_D[4][64] = {
  * Permute the key to give us our key schedule.
  */
 int
-mit_des_make_key_sched(key, schedule)
-     mit_des_cblock key;
-     mit_des_key_schedule schedule;
+mit_des_make_key_sched(mit_des_cblock key, mit_des_key_schedule schedule)
 {
        register unsigned DES_INT32 c, d;
 
index b28c16fae2588689451c9f4d1a927c681476657b..26449a94cb291584cba50e8b98435a66c40b61b7 100644 (file)
@@ -46,9 +46,7 @@
 #include "des_int.h"
 
 int
-mit_des_key_sched(k,schedule)
-    mit_des_cblock k;
-    mit_des_key_schedule schedule;
+mit_des_key_sched(mit_des_cblock k, mit_des_key_schedule schedule)
 {
     mit_des_make_key_sched(k,schedule);
 
index 6a8eb190601f9a5f072a58b8f561899ef0679c13..73e1ae449fc3499dcfe12fda402025abc95c8504 100644 (file)
 /*#define PRINT_TEST_VECTORS*/
 
 krb5_error_code
-mit_des_string_to_key_int (keyblock, data, salt)
-    krb5_keyblock * keyblock;
-    const krb5_data * data;
-    const krb5_data * salt;
+mit_des_string_to_key_int (krb5_keyblock *keyblock, const krb5_data *data,
+                          const krb5_data *salt)
 {
     register krb5_octet *str, *copystr;
     register krb5_octet *key;
index 4408d8a9691438ba4382c8bdce26dcf2981eefb1..005b163874d0d2c442733fcacdd1c8938def85cd 100644 (file)
@@ -71,8 +71,7 @@ static const mit_des_cblock weak[16] = {
  * Requires: key has correct odd parity.
  */
 int
-mit_des_is_weak_key(key)
-     mit_des_cblock key;
+mit_des_is_weak_key(mit_des_cblock key)
 {
     int i;
     const mit_des_cblock *weak_p = weak;
index 98adf7537e5a643218e01788e7de75cff05b0529..af7d148da915e773ef9a3ccbc917e69065ed2365 100644 (file)
@@ -1,3 +1,8 @@
+2004-02-18  Ken Raeburn  <raeburn@mit.edu>
+
+       * checksum.c, derive.c, dk_decrypt.c, dk_encrypt.c: Use ANSI C
+       style function definitions.
+
 2004-02-13  Ken Raeburn  <raeburn@mit.edu>
 
        * dk_decrypt.c (krb5_dk_decrypt_maybe_trunc_hmac): New argument
index ffdb4e7ceaec7098ba893802762ae338f1362c05..4cd540d398134d16dd860a9079ea9f38a012988f 100644 (file)
 #define K5CLENGTH 5 /* 32 bit net byte order integer + one byte seed */
 
 krb5_error_code
-krb5_dk_make_checksum(hash, key, usage, input, output)
-     const struct krb5_hash_provider *hash;
-     const krb5_keyblock *key;
-     krb5_keyusage usage;
-     const krb5_data *input;
-     krb5_data *output;
+krb5_dk_make_checksum(const struct krb5_hash_provider *hash,
+                     const krb5_keyblock *key, krb5_keyusage usage,
+                     const krb5_data *input, krb5_data *output)
 {
     int i;
     const struct krb5_enc_provider *enc;
@@ -106,12 +103,9 @@ cleanup:
 
 #ifdef ATHENA_DES3_KLUDGE
 krb5_error_code
-krb5_marc_dk_make_checksum(hash, key, usage, input, output)
-     const struct krb5_hash_provider *hash;
-     const krb5_keyblock *key;
-     krb5_keyusage usage;
-     const krb5_data *input;
-     krb5_data *output;
+krb5_marc_dk_make_checksum(const struct krb5_hash_provider *hash,
+                          const krb5_keyblock *key, krb5_keyusage usage,
+                          const krb5_data *input, krb5_data *output)
 {
     int i;
     struct krb5_enc_provider *enc;
index 6c8ff0bdc32ed5697f83f64a8a063e136a3609cc..6c55c5e52f375e7bc59b8248359564ee198c895b 100644 (file)
 #include "dk.h"
 
 krb5_error_code
-krb5_derive_key(enc, inkey, outkey, in_constant)
-     const struct krb5_enc_provider *enc;
-     const krb5_keyblock *inkey;
-     krb5_keyblock *outkey;
-     const krb5_data *in_constant;
+krb5_derive_key(const struct krb5_enc_provider *enc,
+               const krb5_keyblock *inkey, krb5_keyblock *outkey,
+               const krb5_data *in_constant)
 {
     size_t blocksize, keybytes, keylength, n;
     unsigned char *inblockdata, *outblockdata, *rawkey;
@@ -115,11 +113,9 @@ krb5_derive_key(enc, inkey, outkey, in_constant)
 
 
 krb5_error_code
-krb5_derive_random(enc, inkey, outrnd, in_constant)
-     const struct krb5_enc_provider *enc;
-     const krb5_keyblock *inkey;
-     krb5_data *outrnd;
-     const krb5_data *in_constant;
+krb5_derive_random(const struct krb5_enc_provider *enc,
+                  const krb5_keyblock *inkey, krb5_data *outrnd,
+                  const krb5_data *in_constant)
 {
     size_t blocksize, keybytes, keylength, n;
     unsigned char *inblockdata, *outblockdata, *rawkey;
index 823eefa277df2115fd26f78cf31740d46b358be8..bebd2665ebdfbb20766931ddf0bd595af0a57996 100644 (file)
@@ -41,45 +41,34 @@ krb5_dk_decrypt_maybe_trunc_hmac(const struct krb5_enc_provider *enc,
                                 int ivec_mode);
 
 krb5_error_code
-krb5_dk_decrypt(enc, hash, key, usage, ivec, input, output)
-     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_dk_decrypt(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)
 {
     return krb5_dk_decrypt_maybe_trunc_hmac(enc, hash, key, usage,
                                            ivec, input, output, 0, 0);
 }
 
 krb5_error_code
-krb5int_aes_dk_decrypt(enc, hash, key, usage, ivec, input, output)
-     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;
+krb5int_aes_dk_decrypt(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)
 {
     return krb5_dk_decrypt_maybe_trunc_hmac(enc, hash, key, usage,
                                            ivec, input, output, 96 / 8, 1);
 }
 
 static krb5_error_code
-krb5_dk_decrypt_maybe_trunc_hmac(enc, hash, key, usage, ivec, input, output,
-                                hmacsize, ivec_mode)
-     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;
-     size_t hmacsize;
-     int ivec_mode;
+krb5_dk_decrypt_maybe_trunc_hmac(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, size_t hmacsize,
+                                int ivec_mode)
 {
     krb5_error_code ret;
     size_t hashsize, blocksize, keybytes, keylength, enclen, plainlen;
index cf6b826a4d896bb94a5daa0d30c4dc6c2e1165fc..08d26856c949af0b4136cf256e63525af596a17d 100644 (file)
    include these bits of info. */
 
 void
-krb5_dk_encrypt_length(enc, hash, inputlen, length)
-     const struct krb5_enc_provider *enc;
-     const struct krb5_hash_provider *hash;
-     size_t inputlen;
-     size_t *length;
+krb5_dk_encrypt_length(const struct krb5_enc_provider *enc,
+                      const struct krb5_hash_provider *hash,
+                      size_t inputlen, size_t *length)
 {
     size_t blocksize, hashsize;
 
@@ -51,14 +49,11 @@ krb5_dk_encrypt_length(enc, hash, inputlen, length)
 }
 
 krb5_error_code
-krb5_dk_encrypt(enc, hash, key, usage, ivec, input, output)
-     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_dk_encrypt(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)
 {
     size_t blocksize, keybytes, keylength, plainlen, enclen;
     krb5_error_code ret;
@@ -180,11 +175,9 @@ cleanup:
 /* Not necessarily "AES", per se, but "a CBC+CTS mode block cipher
    with a 96-bit truncated HMAC".  */
 void
-krb5int_aes_encrypt_length(enc, hash, inputlen, length)
-     const struct krb5_enc_provider *enc;
-     const struct krb5_hash_provider *hash;
-     size_t inputlen;
-     size_t *length;
+krb5int_aes_encrypt_length(const struct krb5_enc_provider *enc,
+                          const struct krb5_hash_provider *hash,
+                          size_t inputlen, size_t *length)
 {
     size_t blocksize, hashsize;
 
@@ -221,14 +214,11 @@ trunc_hmac (const struct krb5_hash_provider *hash,
 }
 
 krb5_error_code
-krb5int_aes_dk_encrypt(enc, hash, key, usage, ivec, input, output)
-     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;
+krb5int_aes_dk_encrypt(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)
 {
     size_t blocksize, keybytes, keylength, plainlen, enclen;
     krb5_error_code ret;
index cc2593a6bf83e8067814765979091cfb4eaa1f61..c215dc42931a9e7a0cd1274daa09962465551966 100644 (file)
 #include "etypes.h"
 
 krb5_error_code KRB5_CALLCONV
-krb5_c_encrypt(context, key, usage, ivec, input, output)
-     krb5_context context;
-     const krb5_keyblock *key;
-     krb5_keyusage usage;
-     const krb5_data *ivec;
-     const krb5_data *input;
-     krb5_enc_data *output;
+krb5_c_encrypt(krb5_context context, const krb5_keyblock *key,
+              krb5_keyusage usage, const krb5_data *ivec,
+              const krb5_data *input, krb5_enc_data *output)
 {
     int i;
 
index c23e56349c1b26a655c05d216ae5bf979e04967b..71c25e7353a8e767e65458e4973c98238c20a8bd 100644 (file)
 #include "etypes.h"
 
 krb5_error_code KRB5_CALLCONV
-krb5_c_encrypt_length(context, enctype, inputlen, length)
-     krb5_context context;
-     krb5_enctype enctype;
-     size_t inputlen;
-     size_t *length;
+krb5_c_encrypt_length(krb5_context context, krb5_enctype enctype,
+                     size_t inputlen, size_t *length)
 {
     int i;
 
index 940e88ce803bbce4d32d092500fc82add7dfc355..55e827764fc797e82dab18a64d327d0d8ed2f5b8 100644 (file)
 #include "etypes.h"
 
 krb5_error_code KRB5_CALLCONV
-krb5_c_enctype_compare(context, e1, e2, similar)
-     krb5_context context;
-     krb5_enctype e1;
-     krb5_enctype e2;
-     krb5_boolean *similar;
+krb5_c_enctype_compare(krb5_context context, krb5_enctype e1, krb5_enctype e2,
+                      krb5_boolean *similar)
 {
     int i, j;
 
index 42b7d60815f47803f9f2ae46718762a0375bd980..f77dbff1cdca516eb2e8b4c4f62c8d6a6a064b60 100644 (file)
 #include "etypes.h"
 
 krb5_error_code KRB5_CALLCONV
-krb5_enctype_to_string(enctype, buffer, buflen)
-    krb5_enctype       enctype;
-    char               * buffer;
-    size_t             buflen;
+krb5_enctype_to_string(krb5_enctype enctype, char *buffer, size_t buflen)
 {
     int i;
 
index ec39520960e7a7c25dd0472c10bcad486f7cd43e..cc46374c5299e1a643d9644c3cabbaea6507ea22 100644 (file)
  */
 
 krb5_error_code
-krb5_hmac(hash, key, icount, input, output)
-     const struct krb5_hash_provider *hash;
-     const krb5_keyblock *key;
-     unsigned int icount;
-     const krb5_data *input;
-     krb5_data *output;
+krb5_hmac(const struct krb5_hash_provider *hash, const krb5_keyblock *key,
+         unsigned int icount, const krb5_data *input, krb5_data *output)
 {
     size_t hashsize, blocksize;
     unsigned char *xorkey, *ihash;
index 46b672cb018ce887e5aa21ca2497af7b4fb417cb..0e46466f27ec613ed6d685003422217ffa13e870 100644 (file)
@@ -28,8 +28,7 @@
 #include "etypes.h"
 #include "cksumtypes.h"
 
-static int etype_match(e1, e2)
-     krb5_enctype e1, e2;
+static int etype_match(krb5_enctype e1, krb5_enctype e2)
 {
     int i1, i2;
 
@@ -47,11 +46,8 @@ static int etype_match(e1, e2)
 }
 
 krb5_error_code KRB5_CALLCONV
-krb5_c_keyed_checksum_types(context, enctype, count, cksumtypes)
-     krb5_context context;
-     krb5_enctype enctype;
-     unsigned int *count;
-     krb5_cksumtype **cksumtypes;
+krb5_c_keyed_checksum_types(krb5_context context, krb5_enctype enctype,
+                           unsigned int *count, krb5_cksumtype **cksumtypes)
 {
     unsigned int i, c;
 
@@ -84,9 +80,7 @@ krb5_c_keyed_checksum_types(context, enctype, count, cksumtypes)
 }
 
 void KRB5_CALLCONV
-krb5_free_cksumtypes(context, val)
-    krb5_context context;
-    krb5_cksumtype * val;
+krb5_free_cksumtypes(krb5_context context, krb5_cksumtype *val)
 {
     if (val)
        krb5_xfree(val);
index f5d229bb9206489d453c517a9df3010dae49a6d3..7056f8f99eae0524782739f1d7ebfd8fef281a69 100644 (file)
@@ -28,8 +28,7 @@
 #include "cksumtypes.h"
 
 krb5_boolean KRB5_CALLCONV
-krb5_c_is_keyed_cksum(ctype)
-     krb5_cksumtype ctype;
+krb5_c_is_keyed_cksum(krb5_cksumtype ctype)
 {
     int i;
 
index 9d272eb796ab18da8a6473072d7f153f78bb1e1a..40a181db4b98a03fbeac2401b48c77aee49708e8 100644 (file)
 #include "dk.h"
 
 krb5_error_code KRB5_CALLCONV
-krb5_c_make_checksum(context, cksumtype, key, usage, input, cksum)
-     krb5_context context;
-     krb5_cksumtype cksumtype;
-     const krb5_keyblock *key;
-     krb5_keyusage usage;
-     const krb5_data *input;
-     krb5_checksum *cksum;
+krb5_c_make_checksum(krb5_context context, krb5_cksumtype cksumtype,
+                    const krb5_keyblock *key, krb5_keyusage usage,
+                    const krb5_data *input, krb5_checksum *cksum)
 {
     int i, e1, e2;
     krb5_data data;
index c0c0debde4993465b73d29e4acbdb769e34439a5..0ae321dca7890ea5aa8bb40979fd254a3487d31a 100644 (file)
 #include "etypes.h"
 
 krb5_error_code KRB5_CALLCONV
-krb5_c_make_random_key(context, enctype, random_key)
-     krb5_context context;
-     krb5_enctype enctype;
-     krb5_keyblock *random_key;
+krb5_c_make_random_key(krb5_context context, krb5_enctype enctype,
+                      krb5_keyblock *random_key)
 {
     int i;
     krb5_error_code ret;
index b5bc33ca441bd84871ea1f8e098cd0481a299cec..8968b27f2294af60e41c8c7f863b23c1a6f497e2 100644 (file)
@@ -1,3 +1,7 @@
+2004-02-18  Ken Raeburn  <raeburn@mit.edu>
+
+       * md4.c: Use ANSI C style function definitions.
+
 2003-07-17  Ken Raeburn  <raeburn@mit.edu>
 
        * Makefile.in (LIBNAME) [##WIN16##]: Don't define.
index 36bcb65a997aec9cc8a7fba2477c7a73452bb976..3541bce56f2ac7b4360c9ae90d2749f5de9d1af1 100644 (file)
@@ -76,8 +76,7 @@ static const unsigned char PADDING[64] = {
    (a) = ROTATE_LEFT ((a), (s));}
 
 void
-krb5_MD4Init (mdContext)
-krb5_MD4_CTX *mdContext;
+krb5_MD4Init (krb5_MD4_CTX *mdContext)
 {
   mdContext->i[0] = mdContext->i[1] = (krb5_ui_4)0;
 
@@ -90,10 +89,7 @@ krb5_MD4_CTX *mdContext;
 }
 
 void
-krb5_MD4Update (mdContext, inBuf, inLen)
-krb5_MD4_CTX *mdContext;
-const unsigned char *inBuf;
-unsigned int inLen;
+krb5_MD4Update (krb5_MD4_CTX *mdContext, const unsigned char *inBuf, unsigned int inLen)
 {
   krb5_ui_4 in[16];
   int mdi;
@@ -126,8 +122,7 @@ unsigned int inLen;
 }
 
 void
-krb5_MD4Final (mdContext)
-krb5_MD4_CTX *mdContext;
+krb5_MD4Final (krb5_MD4_CTX *mdContext)
 {
   krb5_ui_4 in[16];
   int mdi;
@@ -168,9 +163,7 @@ krb5_MD4_CTX *mdContext;
 
 /* Basic MD4 step. Transform buf based on in.
  */
-static void Transform (buf, in)
-krb5_ui_4 *buf;
-krb5_ui_4 *in;
+static void Transform (krb5_ui_4 *buf, krb5_ui_4 *in)
 {
   register krb5_ui_4 a = buf[0], b = buf[1], c = buf[2], d = buf[3];
 
index c7272b10615da8069a710b09472eec22cf12a9f7..26f5c8f38dcc56a5ad491061d1062e64a5f859f5 100644 (file)
@@ -1,3 +1,7 @@
+2004-02-18  Ken Raeburn  <raeburn@mit.edu>
+
+       * md5.c: Use ANSI C style function definitions.
+
 2003-07-17  Ken Raeburn  <raeburn@mit.edu>
 
        * Makefile.in (LIBNAME) [##WIN16##]: Don't define.
index 98c48e49433fe629b27c900e84ec20875594c17d..6c4cc57a3ac7525540ff2241ca79f3bd7c9a7a4d 100644 (file)
@@ -107,8 +107,7 @@ static const unsigned char PADDING[64] = {
    mdContext. All fields are set to zero.
  */
 void 
-krb5_MD5Init (mdContext)
-krb5_MD5_CTX *mdContext;
+krb5_MD5Init (krb5_MD5_CTX *mdContext)
 {
   mdContext->i[0] = mdContext->i[1] = (krb5_ui_4)0;
 
@@ -125,10 +124,7 @@ krb5_MD5_CTX *mdContext;
    in the message whose digest is being computed.
  */
 void
-krb5_MD5Update (mdContext, inBuf, inLen)
-krb5_MD5_CTX *mdContext;
-const unsigned char *inBuf;
-unsigned int inLen;
+krb5_MD5Update (krb5_MD5_CTX *mdContext, const unsigned char *inBuf, unsigned int inLen)
 {
   krb5_ui_4 in[16];
   int mdi;
@@ -164,8 +160,7 @@ unsigned int inLen;
    ends with the desired message digest in mdContext->digest[0...15].
  */
 void
-krb5_MD5Final (mdContext)
-krb5_MD5_CTX *mdContext;
+krb5_MD5Final (krb5_MD5_CTX *mdContext)
 {
   krb5_ui_4 in[16];
   int mdi;
@@ -205,9 +200,7 @@ krb5_MD5_CTX *mdContext;
 
 /* Basic MD5 step. Transforms buf based on in.
  */
-static void Transform (buf, in)
-krb5_ui_4 *buf;
-krb5_ui_4 *in;
+static void Transform (krb5_ui_4 *buf, krb5_ui_4 *in)
 {
   register krb5_ui_4 a = buf[0], b = buf[1], c = buf[2], d = buf[3];
 
index 937f09669ce43789e852da9d80d187fb3fc1917e..1f1902d1cc27a1e19906ba08404ac3e994734ddd 100644 (file)
@@ -46,11 +46,8 @@ n-fold(k-bits):
 /* input length is in bits */
 
 void
-krb5_nfold(inbits, in, outbits, out)
-     unsigned int inbits;
-     const unsigned char *in;
-     unsigned int outbits;
-     unsigned char *out;
+krb5_nfold(unsigned int inbits, const unsigned char *in, unsigned int outbits,
+          unsigned char *out)
 {
     int a,b,c,lcm;
     int byte, i, msbit;
index 126b2f1ad4e83de50df6d76624b60cec8922fc41..34d257f6cd208861374d9b8a76ce1e5994d8ec30 100644 (file)
@@ -1,3 +1,7 @@
+2004-02-18  Ken Raeburn  <raeburn@mit.edu>
+
+       * des_stringtokey.c: Use ANSI C style function definitions.
+
 2003-07-22  Ken Raeburn  <raeburn@mit.edu>
 
        * old_decrypt.c (krb5_old_decrypt): Use block_size and hashsize
index 20f2f053a544715a66faeb59a84e5abb5e02eb0a..2bacb4ef9f1deafa1c63a382045f47fd88d828e4 100644 (file)
@@ -35,12 +35,10 @@ extern krb5_error_code mit_des_string_to_key_int
                 const krb5_data * salt);
 
 krb5_error_code
-krb5int_des_string_to_key(enc, string, salt, parm, key)
-     const struct krb5_enc_provider *enc;
-     const krb5_data *string;
-     const krb5_data *salt;
-     const krb5_data *parm;
-     krb5_keyblock *key;
+krb5int_des_string_to_key(const struct krb5_enc_provider *enc,
+                         const krb5_data *string,
+                         const krb5_data *salt, const krb5_data *parm,
+                         krb5_keyblock *key)
 {
     int type;
     if (parm ) {
index 695f91e5b2f2e1403e355668120d335074eb8d15..fda16909a3a7ebc90c299280b0881f4533288640 100644 (file)
 #include "k5-int.h"
 
 krb5_error_code KRB5_CALLCONV
-krb5_encrypt(context, inptr, outptr, size, eblock, ivec)
-     krb5_context context;
-     krb5_const_pointer inptr;
-     krb5_pointer outptr;
-     size_t size;
-     krb5_encrypt_block * eblock;
-     krb5_pointer ivec;
+krb5_encrypt(krb5_context context, krb5_const_pointer inptr,
+            krb5_pointer outptr, size_t size, krb5_encrypt_block *eblock,
+            krb5_pointer ivec)
 {
     krb5_data inputd, ivecd;
     krb5_enc_data outputd;
@@ -66,13 +62,9 @@ krb5_encrypt(context, inptr, outptr, size, eblock, ivec)
 }
 
 krb5_error_code KRB5_CALLCONV
-krb5_decrypt(context, inptr, outptr, size, eblock, ivec)
-     krb5_context context;
-     krb5_const_pointer inptr;
-     krb5_pointer outptr;
-     size_t size;
-     krb5_encrypt_block * eblock;
-     krb5_pointer ivec;
+krb5_decrypt(krb5_context context, krb5_const_pointer inptr,
+            krb5_pointer outptr, size_t size, krb5_encrypt_block *eblock,
+            krb5_pointer ivec)
 {
     krb5_enc_data inputd;
     krb5_data outputd, ivecd;
@@ -103,10 +95,8 @@ krb5_decrypt(context, inptr, outptr, size, eblock, ivec)
 }
 
 krb5_error_code KRB5_CALLCONV
-krb5_process_key(context, eblock, key)
-     krb5_context context;
-     krb5_encrypt_block * eblock;
-     const krb5_keyblock * key;
+krb5_process_key(krb5_context context, krb5_encrypt_block *eblock,
+                const krb5_keyblock *key)
 {
     eblock->key = (krb5_keyblock *) key;
 
@@ -114,31 +104,23 @@ krb5_process_key(context, eblock, key)
 }
 
 krb5_error_code KRB5_CALLCONV
-krb5_finish_key(context, eblock)
-     krb5_context context;
-     krb5_encrypt_block * eblock;
+krb5_finish_key(krb5_context context, krb5_encrypt_block *eblock)
 {
     return(0);
 }
 
 krb5_error_code KRB5_CALLCONV
-krb5_string_to_key(context, eblock, keyblock, data, salt)
-     krb5_context context;
-     const krb5_encrypt_block * eblock;
-     krb5_keyblock * keyblock;
-     const krb5_data * data;
-     const krb5_data * salt;
+krb5_string_to_key(krb5_context context, const krb5_encrypt_block *eblock,
+                  krb5_keyblock *keyblock, const krb5_data *data,
+                  const krb5_data *salt)
 {
     return(krb5_c_string_to_key(context, eblock->crypto_entry, data, salt,
                                keyblock));
 }
 
 krb5_error_code KRB5_CALLCONV
-krb5_init_random_key(context, eblock, keyblock, ptr)
-     krb5_context context;
-     const krb5_encrypt_block * eblock;
-     const krb5_keyblock * keyblock;
-     krb5_pointer * ptr;
+krb5_init_random_key(krb5_context context, const krb5_encrypt_block *eblock,
+                    const krb5_keyblock *keyblock, krb5_pointer *ptr)
 {
     krb5_data data;
 
@@ -149,20 +131,15 @@ krb5_init_random_key(context, eblock, keyblock, ptr)
 }
 
 krb5_error_code KRB5_CALLCONV
-krb5_finish_random_key(context, eblock, ptr)
-     krb5_context context;
-     const krb5_encrypt_block * eblock;
-     krb5_pointer * ptr;
+krb5_finish_random_key(krb5_context context, const krb5_encrypt_block *eblock,
+                      krb5_pointer *ptr)
 {
     return(0);
 }
 
 krb5_error_code KRB5_CALLCONV
-krb5_random_key(context, eblock, ptr, keyblock)
-     krb5_context context;
-     const krb5_encrypt_block * eblock;
-     krb5_pointer ptr;
-     krb5_keyblock ** keyblock;
+krb5_random_key(krb5_context context, const krb5_encrypt_block *eblock,
+               krb5_pointer ptr, krb5_keyblock **keyblock)
 {
     krb5_keyblock *key;
     krb5_error_code ret;
@@ -179,18 +156,14 @@ krb5_random_key(context, eblock, ptr, keyblock)
 }
 
 krb5_enctype KRB5_CALLCONV
-krb5_eblock_enctype(context, eblock)
-     krb5_context context;
-     const krb5_encrypt_block * eblock;
+krb5_eblock_enctype(krb5_context context, const krb5_encrypt_block *eblock)
 {
     return(eblock->crypto_entry);
 }
 
 krb5_error_code KRB5_CALLCONV
-krb5_use_enctype(context, eblock, enctype)
-     krb5_context context;
-     krb5_encrypt_block * eblock;
-     const krb5_enctype enctype;
+krb5_use_enctype(krb5_context context, krb5_encrypt_block *eblock,
+                krb5_enctype enctype)
 {
     eblock->crypto_entry = enctype;
 
@@ -198,9 +171,7 @@ krb5_use_enctype(context, eblock, enctype)
 }
 
 size_t KRB5_CALLCONV
-krb5_encrypt_size(length, crypto)
-     size_t length;
-     krb5_enctype crypto;
+krb5_encrypt_size(size_t length, krb5_enctype crypto)
 {
     size_t ret;
 
@@ -211,9 +182,7 @@ krb5_encrypt_size(length, crypto)
 }
 
 size_t KRB5_CALLCONV
-krb5_checksum_size(context, ctype)
-     krb5_context context;
-     krb5_cksumtype ctype;
+krb5_checksum_size(krb5_context context, krb5_cksumtype ctype)
 {
     size_t ret;
 
@@ -224,15 +193,10 @@ krb5_checksum_size(context, ctype)
 }
 
 krb5_error_code KRB5_CALLCONV
-krb5_calculate_checksum(context, ctype, in, in_length,
-                                       seed, seed_length, outcksum)
-     krb5_context context;
-     krb5_cksumtype ctype;
-     krb5_const_pointer in;
-     size_t in_length;
-     krb5_const_pointer seed;
-     size_t seed_length;
-     krb5_checksum * outcksum;
+krb5_calculate_checksum(krb5_context context, krb5_cksumtype ctype,
+                       krb5_const_pointer in, size_t in_length,
+                       krb5_const_pointer seed, size_t seed_length,
+                       krb5_checksum *outcksum)
 {
     krb5_data input;
     krb5_keyblock key;
@@ -265,15 +229,10 @@ krb5_calculate_checksum(context, ctype, in, in_length,
 }
 
 krb5_error_code KRB5_CALLCONV
-krb5_verify_checksum(context, ctype, cksum, in, in_length,
-                                    seed, seed_length)
-     krb5_context context;
-     krb5_cksumtype ctype;
-     const krb5_checksum * cksum;
-     krb5_const_pointer in;
-     size_t in_length;
-     krb5_const_pointer seed;
-     size_t seed_length;
+krb5_verify_checksum(krb5_context context, krb5_cksumtype ctype,
+                    const krb5_checksum *cksum, krb5_const_pointer in,
+                    size_t in_length, krb5_const_pointer seed,
+                    size_t seed_length)
 {
     krb5_data input;
     krb5_keyblock key;
@@ -297,9 +256,7 @@ krb5_verify_checksum(context, ctype, cksum, in, in_length,
 }
 
 krb5_error_code KRB5_CALLCONV
-krb5_random_confounder(size, ptr)
-     size_t size;
-     krb5_pointer ptr;
+krb5_random_confounder(size_t size, krb5_pointer ptr)
 {
     krb5_data random_data;
 
@@ -309,12 +266,9 @@ krb5_random_confounder(size, ptr)
     return(krb5_c_random_make_octets(/* XXX */ 0, &random_data));
 }
 
-krb5_error_code krb5_encrypt_data(context, key, ivec, data, enc_data)
-     krb5_context context;
-     krb5_keyblock *key;
-     krb5_pointer ivec;
-     krb5_data *data;
-     krb5_enc_data *enc_data;
+krb5_error_code krb5_encrypt_data(krb5_context context, krb5_keyblock *key,
+                                 krb5_pointer ivec, krb5_data *data,
+                                 krb5_enc_data *enc_data)
 {
     krb5_error_code ret;
     size_t enclen, blocksize;
@@ -345,12 +299,9 @@ krb5_error_code krb5_encrypt_data(context, key, ivec, data, enc_data)
     return(ret);
 }
 
-krb5_error_code krb5_decrypt_data(context, key, ivec, enc_data, data)
-     krb5_context context;
-     krb5_keyblock *key;
-     krb5_pointer ivec;
-     krb5_enc_data *enc_data;
-     krb5_data *data;
+krb5_error_code krb5_decrypt_data(krb5_context context, krb5_keyblock *key,
+                                 krb5_pointer ivec, krb5_enc_data *enc_data,
+                                 krb5_data *data)
 {
     krb5_error_code ret;
     krb5_data ivecd;
index 881eebd340227363ec2699315e44089883d9e34e..5f0d3864a3de0331c4f4facfce2f94960b120845 100644 (file)
@@ -123,8 +123,7 @@ void prng_cleanup (void)
 #if defined(_WIN32)
 
 krb5_error_code KRB5_CALLCONV
-krb5_c_random_os_entropy (
-                         krb5_context context, int strong, int *success)
+krb5_c_random_os_entropy (krb5_context context, int strong, int *success)
 {
   if (success)
     *success  = 0;
index 1bd2a019aee80da6c27beb9ed2b59d2d054e1b1a..937242118e06d75a416a5c04ec3a4c14c05c911c 100644 (file)
@@ -1,3 +1,8 @@
+2004-02-18  Ken Raeburn  <raeburn@mit.edu>
+
+       * raw_decrypt.c, raw_encrypt.c: Use ANSI C style function
+       definitions.
+
 2003-07-22  Ken Raeburn  <raeburn@mit.edu>
 
        * raw_encrypt.c (krb5_raw_encrypt_length): Use block_size field
index 9c26968cd0c5f6b0d6592a415ad9a5256efea9f2..767da1f9fadfc3d94b664fe36b0dc468dba4dbb5 100644 (file)
 #include "raw.h"
 
 krb5_error_code
-krb5_raw_decrypt(enc, hash, key, usage, ivec, input, output)
-     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_raw_decrypt(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)
 {
     return((*(enc->decrypt))(key, ivec, input, output));
 }
index 97e1bb5ee83cb0658deece75fd6cef2074f349a6..68b819c016a12f79c9695d05b3f46151e0dd43f3 100644 (file)
 #include "raw.h"
 
 void
-krb5_raw_encrypt_length(enc, hash, inputlen, length)
-     const struct krb5_enc_provider *enc;
-     const struct krb5_hash_provider *hash;
-     size_t inputlen;
-     size_t *length;
+krb5_raw_encrypt_length(const struct krb5_enc_provider *enc,
+                       const struct krb5_hash_provider *hash,
+                       size_t inputlen, size_t *length)
 {
     size_t blocksize;
 
@@ -42,14 +40,11 @@ krb5_raw_encrypt_length(enc, hash, inputlen, length)
 }
 
 krb5_error_code
-krb5_raw_encrypt(enc, hash, key, usage, ivec, input, output)
-     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_raw_encrypt(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)
 {
     return((*(enc->encrypt))(key, ivec, input, output));
 }
index ebdfe618c9766fda3817da58e7e557fa90a5081d..487f09e40e9fc72ee80dc53ca9f2656cd2d106ea 100644 (file)
@@ -1,3 +1,7 @@
+2004-02-18  Ken Raeburn  <raeburn@mit.edu>
+
+       * shs.c: Use ANSI C style function definitions.
+
 2003-07-17  Ken Raeburn  <raeburn@mit.edu>
 
        * Makefile.in (LIBNAME) [##WIN16##]: Don't define.
index 423e981fcf6e4745cd75ab1eb175bdd00afb9546..f97856ee4f26fed0835c0fd6f9019884547085c6 100644 (file)
@@ -76,8 +76,7 @@
 
 /* Initialize the SHS values */
 
-void shsInit(shsInfo)
-    SHS_INFO *shsInfo;
+void shsInit(SHS_INFO *shsInfo)
 {
     /* Set the h-vars to their initial values */
     shsInfo->digest[ 0 ] = h0init;
@@ -100,9 +99,7 @@ void shsInit(shsInfo)
 static void SHSTransform (SHS_LONG *digest, const SHS_LONG *data);
 
 static
-void SHSTransform(digest, data)
-    SHS_LONG *digest;
-    const SHS_LONG *data;
+void SHSTransform(SHS_LONG *digest, const SHS_LONG *data)
 {
     SHS_LONG A, B, C, D, E;     /* Local vars */
     SHS_LONG eData[ 16 ];       /* Expanded data */
@@ -215,10 +212,7 @@ void SHSTransform(digest, data)
 
 /* Update SHS for a block of data */
 
-void shsUpdate(shsInfo, buffer, count)
-    SHS_INFO *shsInfo;
-    const SHS_BYTE *buffer;
-    int count;
+void shsUpdate(SHS_INFO *shsInfo, const SHS_BYTE *buffer, int count)
 {
     SHS_LONG tmp;
     int dataCount, canfill;
@@ -314,8 +308,7 @@ void shsUpdate(shsInfo, buffer, count)
 /* Final wrapup - pad to SHS_DATASIZE-byte boundary with the bit pattern
    1 0* (64-bit count of bits processed, MSB-first) */
 
-void shsFinal(shsInfo)
-    SHS_INFO *shsInfo;
+void shsFinal(SHS_INFO *shsInfo)
 {
     int count;
     SHS_LONG *lp;
index 873ea9b49fef4576c60c26e26925fc134bd8541f..710f26160f2d4f2c421fe802567ad529428bf005 100644 (file)
@@ -28,9 +28,7 @@
 #include "cksumtypes.h"
 
 krb5_error_code KRB5_CALLCONV
-krb5_string_to_cksumtype(string, cksumtypep)
-    char               * string;
-    krb5_cksumtype     * cksumtypep;
+krb5_string_to_cksumtype(char *string, krb5_cksumtype *cksumtypep)
 {
     int i;
 
index 8862032c67815e036ad181274bc30163d33a9d94..9d3245bf012419ad3b70335a57f5033660509bf2 100644 (file)
@@ -28,9 +28,7 @@
 #include "etypes.h"
 
 krb5_error_code KRB5_CALLCONV
-krb5_string_to_enctype(string, enctypep)
-    char               * string;
-    krb5_enctype       * enctypep;
+krb5_string_to_enctype(char *string, krb5_enctype *enctypep)
 {
     int i;
 
index 27f49aabe73ce0c874fa71187705f67d87b46c81..03165ab25d5886e5cc75a7580fec756954081d3e 100644 (file)
@@ -37,25 +37,19 @@ krb5_c_string_to_key_with_params(krb5_context context,
 
 
 krb5_error_code KRB5_CALLCONV
-krb5_c_string_to_key(context, enctype, string, salt, key)
-     krb5_context context;
-     krb5_enctype enctype;
-     const krb5_data *string;
-     const krb5_data *salt;
-     krb5_keyblock *key;
+krb5_c_string_to_key(krb5_context context, krb5_enctype enctype,
+                    const krb5_data *string, const krb5_data *salt,
+                    krb5_keyblock *key)
 {
     return krb5_c_string_to_key_with_params(context, enctype, string, salt,
                                            NULL, key);
 }
 
 krb5_error_code KRB5_CALLCONV
-krb5_c_string_to_key_with_params(context, enctype, string, salt, params, key)
-     krb5_context context;
-     krb5_enctype enctype;
-     const krb5_data *string;
-     const krb5_data *salt;
-     const krb5_data *params;
-     krb5_keyblock *key;
+krb5_c_string_to_key_with_params(krb5_context context, krb5_enctype enctype,
+                                const krb5_data *string,
+                                const krb5_data *salt,
+                                const krb5_data *params, krb5_keyblock *key)
 {
     int i;
     krb5_error_code ret;
index 071a335578a83a1898b4530922fe63534b2a5216..bc34c0b957bdf11126f9bee8a58010a573f93538 100644 (file)
@@ -28,8 +28,7 @@
 #include "cksumtypes.h"
 
 krb5_boolean KRB5_CALLCONV
-krb5_c_valid_cksumtype(ctype)
-     krb5_cksumtype ctype;
+krb5_c_valid_cksumtype(krb5_cksumtype ctype)
 {
     int i;
 
index 9b661811a1abb7ed6946f7847bd92a6f3cc341b8..f36023084a3db128317bc4a41fe241acaf4385f9 100644 (file)
@@ -28,8 +28,7 @@
 #include "etypes.h"
 
 krb5_boolean KRB5_CALLCONV
-krb5_c_valid_enctype(etype)
-     krb5_enctype etype;
+krb5_c_valid_enctype(krb5_enctype etype)
 {
     int i;
 
index 0c97cb598f9c26f0236acb5ba90ab41db5ae429c..30c9c07c0f535e57f50e13b096d2d01f5a5efbbf 100644 (file)
 #include "cksumtypes.h"
 
 krb5_error_code KRB5_CALLCONV
-krb5_c_verify_checksum(context, key, usage, data, cksum, valid)
-     krb5_context context;
-     const krb5_keyblock *key;
-     krb5_keyusage usage;
-     const krb5_data *data;
-     const krb5_checksum *cksum;
-     krb5_boolean *valid;
+krb5_c_verify_checksum(krb5_context context, const krb5_keyblock *key,
+                      krb5_keyusage usage, const krb5_data *data,
+                      const krb5_checksum *cksum, krb5_boolean *valid)
 {
     int i;
     size_t hashsize;