add 'const' where needed
authorJohn Kohl <jtkohl@mit.edu>
Fri, 19 Oct 1990 10:06:32 +0000 (10:06 +0000)
committerJohn Kohl <jtkohl@mit.edu>
Fri, 19 Oct 1990 10:06:32 +0000 (10:06 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1284 dc483132-0cff-0310-8789-dd5450dbe970

src/include/krb5/encryption.h
src/lib/crypto/des/des_int.h
src/lib/crypto/des/init_rkey.c
src/lib/crypto/des/string2key.c

index 9ffe8083cef28b97d92cc46345224178d5f13a3b..5829c188ef5d40218d051912b319d70672fa157e 100644 (file)
@@ -54,12 +54,12 @@ typedef struct _krb5_cryptosystem_entry {
                                               krb5_encrypt_block *,
                                               krb5_pointer));
     krb5_error_code (*process_key) PROTOTYPE((krb5_encrypt_block *,
-                                             const krb5_keyblock *));
+                                             krb5_keyblock *));
     krb5_error_code (*finish_key) PROTOTYPE((krb5_encrypt_block *));
     krb5_error_code (*string_to_key) PROTOTYPE((const krb5_keytype,
                                                krb5_keyblock *,
                                                const krb5_data *,
-                                               const krb5_principal));
+                                               krb5_const_principal));
     krb5_error_code  (*init_random_key) PROTOTYPE((const krb5_keyblock *,
                                                   krb5_pointer *));
     krb5_error_code  (*finish_random_key) PROTOTYPE((krb5_pointer *));
index 7e2d781510af6eb3112833bed976643c373163b0..c635ba42c26e711e7f0a71753bdba7072ce6d119 100644 (file)
@@ -105,11 +105,11 @@ extern int mit_des_ecb_encrypt
 
 /* enc_dec.c */
 extern krb5_error_code mit_des_encrypt_func
-    PROTOTYPE(( krb5_pointer, krb5_pointer, size_t, krb5_encrypt_block *,
-              krb5_pointer ));
+    PROTOTYPE(( krb5_const_pointer, krb5_pointer, const size_t,
+              krb5_encrypt_block *, krb5_pointer ));
 extern krb5_error_code mit_des_decrypt_func
-    PROTOTYPE(( krb5_pointer, krb5_pointer, size_t, krb5_encrypt_block *,
-              krb5_pointer ));
+    PROTOTYPE(( krb5_const_pointer, krb5_pointer, const size_t,
+              krb5_encrypt_block *, krb5_pointer ));
 extern krb5_error_code mit_des_cbc_encrypt
     PROTOTYPE((krb5_octet *, krb5_octet *, long, mit_des_key_schedule,
               krb5_octet *, int));
@@ -124,7 +124,7 @@ extern krb5_error_code mit_des_finish_key
 
 /* init_rkey.c */
 extern krb5_error_code mit_des_init_random_key
-    PROTOTYPE(( krb5_keyblock *,  krb5_pointer *));
+    PROTOTYPE(( const krb5_keyblock *,  krb5_pointer *));
 
 /* key_parity.c */
 extern void mit_des_fixup_key_parity PROTOTYPE((mit_des_cblock ));
@@ -156,7 +156,8 @@ extern krb5_error_code mit_des_random_key
 
 /* string2key.c */
 extern krb5_error_code mit_des_string_to_key
-    PROTOTYPE((krb5_keytype, krb5_keyblock *, krb5_data *, krb5_principal ));
+    PROTOTYPE((const krb5_keytype, krb5_keyblock *, const krb5_data *,
+              krb5_const_principal ));
 
 /* weak_key.c */
 extern int mit_des_is_weak_key PROTOTYPE((mit_des_cblock ));
index 1485af5feb4dbf8c1c82f981f2a1ea69a13e9498..c37d1f96aaaf20e4835505b312dfc66ccc40b19c 100644 (file)
@@ -28,9 +28,9 @@ static char rcsid_init_rkey_c[] =
         sequence information.
  */
 
-krb5_error_code mit_des_init_random_key (DECLARG(krb5_keyblock *,seedblock),
+krb5_error_code mit_des_init_random_key (DECLARG(const krb5_keyblock *,seedblock),
                                         DECLARG(krb5_pointer *,seed))
-OLDDECLARG(krb5_keyblock *,seedblock)
+OLDDECLARG(const krb5_keyblock *,seedblock)
 OLDDECLARG(krb5_pointer *,seed)
 {
     mit_des_random_key_seed * p_seed;
index 776050c252bbe6acfe432010f4100cb8b695c719..36d7e07c619a8f85528ed9f3c88a10d905042c02 100644 (file)
@@ -43,14 +43,14 @@ extern int des_debug;
        returns: errors
  */
 
-krb5_error_code mit_des_string_to_key (DECLARG(krb5_keytype, keytype),
+krb5_error_code mit_des_string_to_key (DECLARG(const krb5_keytype, keytype),
                                       DECLARG(krb5_keyblock *,keyblock),
-                                      DECLARG(krb5_data *,data),
-                                      DECLARG(krb5_principal, princ))
-OLDDECLARG(krb5_keytype, keytype)
+                                      DECLARG(const krb5_data *,data),
+                                      DECLARG(krb5_const_principal, princ))
+OLDDECLARG(const krb5_keytype, keytype)
 OLDDECLARG(krb5_keyblock *,keyblock)
-OLDDECLARG(krb5_data *,data)
-OLDDECLARG(krb5_principal, princ)
+OLDDECLARG(const krb5_data *,data)
+OLDDECLARG(krb5_const_principal, princ)
 {
     char copystr[512];