Clean up some broken uses of "const" in function interfaces
authorKen Raeburn <raeburn@mit.edu>
Thu, 19 Dec 2002 05:23:44 +0000 (05:23 +0000)
committerKen Raeburn <raeburn@mit.edu>
Thu, 19 Dec 2002 05:23:44 +0000 (05:23 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15058 dc483132-0cff-0310-8789-dd5450dbe970

src/include/ChangeLog
src/include/krb5.hin
src/lib/crypto/ChangeLog
src/lib/crypto/old_api_glue.c
src/lib/krb5/krb/ChangeLog
src/lib/krb5/krb/conv_princ.c

index 90cee6c97e242b578dda58f25f68cff69e2f2f83..dd72428b4f58867194b05c109a2271dfd5ca46ca 100644 (file)
@@ -1,3 +1,15 @@
+2002-12-19  Ken Raeburn  <raeburn@mit.edu>
+
+       * krb5.hin (krb5_encrypt, krb5_decrypt, krb5_use_enctype,
+       krb5_calculate_checksum, krb5_verify_checksum,
+       krb5_get_credentials, krb5_get_credentials_validate,
+       krb5_get_credentials_renew, krb5_get_cred_via_tkt, krb5_mk_req,
+       krb5_mk_req_extended, krb5_524_conv_principal, krb5_send_tgs,
+       krb5_get_in_tkt, krb5_get_in_tkt_with_password,
+       krb5_get_in_tkt_with_skey, krb5_get_in_tkt_with_keytab,
+       krb5_aname_to_localname): Clean up use of "const" in API, where it
+       was applied to the value passed and not something pointed to.
+
 2002-12-12  Tom Yu  <tlyu@mit.edu>
 
        * krb5.hin: Update comment on krb5_kt_free_entry prototype to
index 78bd1e0c51113a15555db07e7adb04622daee627..9d2d1ef8e05c4df7dfc2fc61b80b23e27a6a595a 100644 (file)
@@ -577,16 +577,16 @@ krb5_boolean KRB5_CALLCONV is_keyed_cksum
  */
 krb5_error_code KRB5_CALLCONV krb5_encrypt
        (krb5_context context,
-               const krb5_pointer inptr,
+               krb5_const_pointer inptr,
                krb5_pointer outptr,
-               const size_t size,
+               size_t size,
                krb5_encrypt_block * eblock,
                krb5_pointer ivec);
 krb5_error_code KRB5_CALLCONV krb5_decrypt
        (krb5_context context,
-               const krb5_pointer inptr,
+               krb5_const_pointer inptr,
                krb5_pointer outptr,
-               const size_t size,
+               size_t size,
                krb5_encrypt_block * eblock,
                krb5_pointer ivec);
 krb5_error_code KRB5_CALLCONV krb5_process_key
@@ -622,7 +622,7 @@ krb5_enctype KRB5_CALLCONV krb5_eblock_enctype
 krb5_error_code KRB5_CALLCONV krb5_use_enctype
        (krb5_context context,
                krb5_encrypt_block * eblock,
-               const krb5_enctype enctype);
+               krb5_enctype enctype);
 size_t KRB5_CALLCONV krb5_encrypt_size
        (size_t length,
                krb5_enctype crypto);
@@ -631,16 +631,16 @@ size_t KRB5_CALLCONV krb5_checksum_size
                krb5_cksumtype ctype);
 krb5_error_code KRB5_CALLCONV krb5_calculate_checksum
        (krb5_context context,
-               const krb5_cksumtype ctype,
-               const krb5_pointer in, const size_t in_length,
-               const krb5_pointer seed, const size_t seed_length,
+               krb5_cksumtype ctype,
+               krb5_const_pointer in, size_t in_length,
+               krb5_const_pointer seed, size_t seed_length,
                krb5_checksum * outcksum);
 krb5_error_code KRB5_CALLCONV krb5_verify_checksum
        (krb5_context context,
                krb5_cksumtype ctype,
                const krb5_checksum * cksum,
-               const krb5_pointer in, const size_t in_length,
-               const krb5_pointer seed, const size_t seed_length);
+               krb5_const_pointer in, size_t in_length,
+               krb5_const_pointer seed, size_t seed_length);
 
 #if KRB5_PRIVATE
 krb5_error_code KRB5_CALLCONV krb5_random_confounder
@@ -1447,19 +1447,19 @@ void KRB5_CALLCONV krb5_free_tgt_creds
 
 krb5_error_code KRB5_CALLCONV krb5_get_credentials
        (krb5_context,
-               const krb5_flags,
+               krb5_flags,
                krb5_ccache,
                krb5_creds *,
                krb5_creds **);
 krb5_error_code KRB5_CALLCONV krb5_get_credentials_validate
        (krb5_context,
-               const krb5_flags,
+               krb5_flags,
                krb5_ccache,
                krb5_creds *,
                krb5_creds **);
 krb5_error_code KRB5_CALLCONV krb5_get_credentials_renew
        (krb5_context,
-               const krb5_flags,
+               krb5_flags,
                krb5_ccache,
                krb5_creds *,
                krb5_creds **);
@@ -1467,7 +1467,7 @@ krb5_error_code KRB5_CALLCONV krb5_get_credentials_renew
 krb5_error_code krb5_get_cred_via_tkt
        (krb5_context,
                   krb5_creds *,
-                  const krb5_flags,
+                  krb5_flags,
                   krb5_address * const *,
                   krb5_creds *,
                   krb5_creds **);
@@ -1475,7 +1475,7 @@ krb5_error_code krb5_get_cred_via_tkt
 krb5_error_code KRB5_CALLCONV krb5_mk_req
        (krb5_context,
                krb5_auth_context *,
-               const krb5_flags,
+               krb5_flags,
                char *,
                char *,
                krb5_data *,
@@ -1484,7 +1484,7 @@ krb5_error_code KRB5_CALLCONV krb5_mk_req
 krb5_error_code KRB5_CALLCONV krb5_mk_req_extended
        (krb5_context,
                krb5_auth_context *,
-               const krb5_flags,
+               krb5_flags,
                krb5_data *,
                krb5_creds *,
                krb5_data * );
@@ -1642,7 +1642,7 @@ krb5_error_code KRB5_CALLCONV krb5_425_conv_principal
                krb5_principal *princ);
 
 krb5_error_code KRB5_CALLCONV krb5_524_conv_principal
-       (krb5_context context, const krb5_principal princ, 
+       (krb5_context context, krb5_const_principal princ, 
                char *name, char *inst, char *realm);
 
 #if KRB5_PRIVATE
@@ -1880,7 +1880,7 @@ krb5_get_profile
 #if KRB5_PRIVATE
 krb5_error_code krb5_send_tgs
        (krb5_context,
-               const krb5_flags,
+               krb5_flags,
                const krb5_ticket_times *,
                const krb5_enctype *,
                krb5_const_principal,
@@ -1895,12 +1895,12 @@ krb5_error_code krb5_send_tgs
 #if KRB5_DEPRECATED
 krb5_error_code KRB5_CALLCONV krb5_get_in_tkt
        (krb5_context,
-               const krb5_flags,
+               krb5_flags,
                krb5_address * const *,
                krb5_enctype *,
                krb5_preauthtype *,
                krb5_error_code ( * )(krb5_context,
-                                       const krb5_enctype,
+                                       krb5_enctype,
                                        krb5_data *,
                                        krb5_const_pointer,
                                        krb5_keyblock **),
@@ -1916,7 +1916,7 @@ krb5_error_code KRB5_CALLCONV krb5_get_in_tkt
 
 krb5_error_code KRB5_CALLCONV krb5_get_in_tkt_with_password
        (krb5_context,
-               const krb5_flags,
+               krb5_flags,
                krb5_address * const *,
                krb5_enctype *,
                krb5_preauthtype *,
@@ -1927,7 +1927,7 @@ krb5_error_code KRB5_CALLCONV krb5_get_in_tkt_with_password
 
 krb5_error_code KRB5_CALLCONV krb5_get_in_tkt_with_skey
        (krb5_context,
-               const krb5_flags,
+               krb5_flags,
                krb5_address * const *,
                krb5_enctype *,
                krb5_preauthtype *,
@@ -1938,11 +1938,11 @@ krb5_error_code KRB5_CALLCONV krb5_get_in_tkt_with_skey
 
 krb5_error_code KRB5_CALLCONV krb5_get_in_tkt_with_keytab
        (krb5_context,
-               const krb5_flags,
+               krb5_flags,
                krb5_address * const *,
                krb5_enctype *,
                krb5_preauthtype *,
-               const krb5_keytab,
+               krb5_keytab,
                krb5_ccache,
                krb5_creds *,
                krb5_kdc_rep ** );
@@ -2234,7 +2234,7 @@ krb5_error_code KRB5_CALLCONV krb5_read_password
 krb5_error_code KRB5_CALLCONV krb5_aname_to_localname
        (krb5_context,
                krb5_const_principal,
-               const int,
+               int,
                char * );
 #if KRB5_PRIVATE
 krb5_error_code KRB5_CALLCONV krb5_get_host_realm
index f513de9d59720286395eb1a82bd432ac802c9dc7..c7af891f1e673ab7cd49c208ec9c614fd5dcfb8d 100644 (file)
@@ -1,3 +1,9 @@
+2002-12-19  Ken Raeburn  <raeburn@mit.edu>
+
+       * old_api_glue.c (krb5_encrypt, krb5_decrypt,
+       krb5_calculate_checksum, krb5_verify_checksum): Clean up use of
+       "const" in API.
+
 2002-12-06  Ezra Peisach  <epeisach@bu.edu>
 
        * Makefile.in (clean): Clean up more test executables and object
index b6847a6c5c8d101f4d4fa8c788e19581cb21847c..695f91e5b2f2e1403e355668120d335074eb8d15 100644 (file)
@@ -29,9 +29,9 @@
 krb5_error_code KRB5_CALLCONV
 krb5_encrypt(context, inptr, outptr, size, eblock, ivec)
      krb5_context context;
-     const krb5_pointer inptr;
+     krb5_const_pointer inptr;
      krb5_pointer outptr;
-     const size_t size;
+     size_t size;
      krb5_encrypt_block * eblock;
      krb5_pointer ivec;
 {
@@ -68,9 +68,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;
-     const krb5_pointer inptr;
+     krb5_const_pointer inptr;
      krb5_pointer outptr;
-     const size_t size;
+     size_t size;
      krb5_encrypt_block * eblock;
      krb5_pointer ivec;
 {
@@ -227,11 +227,11 @@ krb5_error_code KRB5_CALLCONV
 krb5_calculate_checksum(context, ctype, in, in_length,
                                        seed, seed_length, outcksum)
      krb5_context context;
-     const krb5_cksumtype ctype;
-     const krb5_pointer in;
-     const size_t in_length;
-     const krb5_pointer seed;
-     const size_t seed_length;
+     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;
@@ -270,10 +270,10 @@ krb5_verify_checksum(context, ctype, cksum, in, in_length,
      krb5_context context;
      krb5_cksumtype ctype;
      const krb5_checksum * cksum;
-     const krb5_pointer in;
-     const size_t in_length;
-     const krb5_pointer seed;
-     const size_t seed_length;
+     krb5_const_pointer in;
+     size_t in_length;
+     krb5_const_pointer seed;
+     size_t seed_length;
 {
     krb5_data input;
     krb5_keyblock key;
index e3f1819178a4636fd5a070a96d42da10a03af8f9..a5543e9010251e923bebe0ba7549ebc4fb14f2f9 100644 (file)
@@ -1,3 +1,8 @@
+2002-12-19  Ken Raeburn  <raeburn@mit.edu>
+
+       * conv_princ.c (krb5_524_conv_principal): Clean up use of "const"
+       in API.
+
 2002-11-14  Ezra Peisach  <epeisach@bu.edu>
 
        * get_in_tkt.c (krb5_get_in_tkt): Do not pass NULL when an
index a4d04e89a1317dce48831ac6f556fa155674caf6..6134baa0a22498ae229ff3e131826a5fadab5aae 100644 (file)
@@ -147,11 +147,11 @@ static char *strnchr(register char *s, register char c,
 #define KRB5_INVALID_PRINCIPAL KRB5_LNAME_BADFORMAT
 
 krb5_error_code KRB5_CALLCONV
-krb5_524_conv_principal(krb5_context context, const krb5_principal princ,
+krb5_524_conv_principal(krb5_context context, krb5_const_principal princ,
                        char *name, char *inst, char *realm)
 {
      const struct krb_convert *p;
-     krb5_data *compo;
+     const krb5_data *compo;
      char *c, *tmp_realm, *tmp_prealm;
      unsigned int tmp_realm_len;
      int retval;