Use const instead of krb5_const
authorKen Raeburn <raeburn@mit.edu>
Sat, 23 Feb 2002 03:20:52 +0000 (03:20 +0000)
committerKen Raeburn <raeburn@mit.edu>
Sat, 23 Feb 2002 03:20:52 +0000 (03:20 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14161 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/crypto/arcfour/ChangeLog
src/lib/crypto/arcfour/arcfour.c
src/lib/crypto/arcfour/arcfour.h
src/lib/crypto/arcfour/string_to_key.c
src/lib/crypto/enc_provider/ChangeLog
src/lib/crypto/enc_provider/arcfour.c
src/lib/kdb/ChangeLog
src/lib/kdb/kdb_xdr.c

index 74647d521917e8c535c0b342ae237ab8fd8480cd..820167178a7fa56c6b2f276cbc929150163ce2ed 100644 (file)
@@ -1,3 +1,8 @@
+2002-02-22  Ken Raeburn  <raeburn@mit.edu>
+
+       * arcfour.h, arcfour.c, string_to_key.c: Use const instead of
+       krb5_const.
+
 2001-12-05  Ezra Peisach  <epeisach@mit.edu>
 
        * string_to_key.c (krb5_arcfour_string_to_key): Use size_t instead
index acf70820beaf22a6190335c08268e496f78adaca..c4b06bb87d10ed04b96d7dd0315a3a2d49530cf9 100644 (file)
@@ -12,8 +12,8 @@ const  char *l40 = "fortybits";
 
 void
 krb5_arcfour_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;
 {
@@ -64,12 +64,12 @@ case 7:                             /* tgs-req authenticator */
 
 krb5_error_code
 krb5_arcfour_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_keyblock k1, k2, k3;
@@ -192,12 +192,12 @@ 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)
-     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_keyblock k1,k2,k3;
index c16ae774fd703c90b00acfbab6f6808731515940..39bf8240a7afdc438e5b441b89efc730d34fccc2 100644 (file)
@@ -2,33 +2,33 @@
 #define ARCFOUR_H
 
 extern void
-krb5_arcfour_encrypt_length(krb5_const struct krb5_enc_provider *,
-                       krb5_const struct krb5_hash_provider *,
+krb5_arcfour_encrypt_length(const struct krb5_enc_provider *,
+                       const struct krb5_hash_provider *,
                        size_t,
                        size_t *);
 
 extern 
-krb5_error_code krb5_arcfour_encrypt(krb5_const struct krb5_enc_provider *,
-                       krb5_const struct krb5_hash_provider *,
-                       krb5_const krb5_keyblock *,
+krb5_error_code krb5_arcfour_encrypt(const struct krb5_enc_provider *,
+                       const struct krb5_hash_provider *,
+                       const krb5_keyblock *,
                        krb5_keyusage,
-                       krb5_const krb5_data *,
-                       krb5_const krb5_data *,
+                       const krb5_data *,
+                       const krb5_data *,
                        krb5_data *);
 
 extern 
-krb5_error_code krb5_arcfour_decrypt(krb5_const struct krb5_enc_provider *,
-                       krb5_const struct krb5_hash_provider *,
-                       krb5_const krb5_keyblock *,
+krb5_error_code krb5_arcfour_decrypt(const struct krb5_enc_provider *,
+                       const struct krb5_hash_provider *,
+                       const krb5_keyblock *,
                        krb5_keyusage,
-                       krb5_const krb5_data *,
-                       krb5_const krb5_data *,
+                       const krb5_data *,
+                       const krb5_data *,
                        krb5_data *);
 
 extern krb5_error_code krb5_arcfour_string_to_key(
-     krb5_const struct krb5_enc_provider *,
-     krb5_const krb5_data *,
-     krb5_const krb5_data *,
+     const struct krb5_enc_provider *,
+     const krb5_data *,
+     const krb5_data *,
      krb5_keyblock *);
 
 extern const struct krb5_enc_provider krb5int_enc_arcfour;
index a40f1ff347b38b6b81e00034b943c708c40cfc84..1fecd4df0f0e771d1edd435227d17460ad16639a 100644 (file)
@@ -13,9 +13,9 @@ static void asctouni(unsigned char *unicode, unsigned char *ascii, size_t len)
 
 krb5_error_code
 krb5_arcfour_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;
 {
   size_t len,slen;
index 4b06974c2f83e04108801bec470e8f8fceed4920..bb66d7b8d96844372aca611ab1a8e1905924209f 100644 (file)
@@ -1,3 +1,7 @@
+2002-02-22  Ken Raeburn  <raeburn@mit.edu>
+
+       * arcfour.c: Use const instead of krb5_const.
+
 2001-11-06  Sam Hartman  <hartmans@mit.edu>
 
        * arcfour.c (k5_arcfour_docrypt): Treat state as an
index 28627b7844fa8bd7e1aab6370949e4ee691554d0..bfdc19372493c1777c144325bdb75e04cfe20c74 100644 (file)
@@ -26,8 +26,8 @@ static void k5_arcfour_crypt(ArcfourContext *ctx, unsigned char *dest,
 
 /* Interface layer to kerb5 crypto layer */
 static krb5_error_code
-k5_arcfour_docrypt(krb5_const krb5_keyblock *, krb5_const krb5_data *,
-                  krb5_const krb5_data *, krb5_data *);
+k5_arcfour_docrypt(const krb5_keyblock *, const krb5_data *,
+                  const krb5_data *, krb5_data *);
 
 
 /* The blocksize for the enctype */
@@ -38,7 +38,7 @@ static void k5_arcfour_keysize(size_t *, size_t *);
 
 /* from a random bitstrem, construct a key */
 static krb5_error_code
-k5_arcfour_make_key(krb5_const krb5_data *, krb5_keyblock *);
+k5_arcfour_make_key(const krb5_data *, krb5_keyblock *);
 
 static unsigned char arcfour_weakkey1[] = {0x00, 0x00, 0xfd};
 static unsigned char arcfour_weakkey2[] = {0x03, 0xfd, 0xfc};
@@ -142,8 +142,8 @@ k5_arcfour_keysize(size_t *keybytes, size_t *keylength)
 
 /* The workhorse of the arcfour system, this impliments the cipher */
 static krb5_error_code
-k5_arcfour_docrypt(krb5_const krb5_keyblock *key, krb5_const krb5_data *state,
-              krb5_const krb5_data *input, krb5_data *output)
+k5_arcfour_docrypt(const krb5_keyblock *key, const krb5_data *state,
+              const krb5_data *input, krb5_data *output)
 {
   ArcfourContext *arcfour_ctx;
   ArcFourCipherState *cipher_state;
@@ -185,7 +185,7 @@ k5_arcfour_docrypt(krb5_const krb5_keyblock *key, krb5_const krb5_data *state,
 }
 
 static krb5_error_code
-k5_arcfour_make_key(krb5_const krb5_data *randombits, krb5_keyblock *key)
+k5_arcfour_make_key(const krb5_data *randombits, krb5_keyblock *key)
 {
     if (key->length != 16)
        return(KRB5_BAD_KEYSIZE);
index 74cac90484e1510015f1fb767459fdc62a23fd91..0be133d0b423de3130eff086ba733d565c6a66d3 100644 (file)
@@ -1,3 +1,8 @@
+2002-02-22  Ken Raeburn  <raeburn@mit.edu>
+
+       * kdb_xdr.c (krb5_dbe_lookup_mod_princ_data): Use const instead of
+       krb5_const.
+
 2001-11-19  Ezra Peisach  <epeisach@mit.edu>
 
        * t_kdb.c (do_testing): Invoke krb5_free_principal and
index adcfbd758584274ec56fac5e3038ca382b440bc1..0dcf1badf6851ad944d2120f121f074694ccf076 100644 (file)
@@ -237,7 +237,7 @@ krb5_dbe_lookup_mod_princ_data(context, entry, mod_time, mod_princ)
 
     /* Mod Princ */
     if ((code = krb5_parse_name(context,
-                               (krb5_const char *) (tl_data.tl_data_contents+4),
+                               (const char *) (tl_data.tl_data_contents+4),
                                mod_princ)))
        return(code);