From 55f59874540afbf0bde424191bd6dab7de76d2c3 Mon Sep 17 00:00:00 2001 From: John Kohl Date: Fri, 19 Oct 1990 10:06:32 +0000 Subject: [PATCH] add 'const' where needed git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1284 dc483132-0cff-0310-8789-dd5450dbe970 --- src/include/krb5/encryption.h | 4 ++-- src/lib/crypto/des/des_int.h | 13 +++++++------ src/lib/crypto/des/init_rkey.c | 4 ++-- src/lib/crypto/des/string2key.c | 12 ++++++------ 4 files changed, 17 insertions(+), 16 deletions(-) diff --git a/src/include/krb5/encryption.h b/src/include/krb5/encryption.h index 9ffe8083c..5829c188e 100644 --- a/src/include/krb5/encryption.h +++ b/src/include/krb5/encryption.h @@ -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 *)); diff --git a/src/lib/crypto/des/des_int.h b/src/lib/crypto/des/des_int.h index 7e2d78151..c635ba42c 100644 --- a/src/lib/crypto/des/des_int.h +++ b/src/lib/crypto/des/des_int.h @@ -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 )); diff --git a/src/lib/crypto/des/init_rkey.c b/src/lib/crypto/des/init_rkey.c index 1485af5fe..c37d1f96a 100644 --- a/src/lib/crypto/des/init_rkey.c +++ b/src/lib/crypto/des/init_rkey.c @@ -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; diff --git a/src/lib/crypto/des/string2key.c b/src/lib/crypto/des/string2key.c index 776050c25..36d7e07c6 100644 --- a/src/lib/crypto/des/string2key.c +++ b/src/lib/crypto/des/string2key.c @@ -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]; -- 2.26.2