From 71254369aefa0b94a7d4e9731ed59bd435b5de69 Mon Sep 17 00:00:00 2001 From: John Kohl Date: Thu, 8 Feb 1990 10:19:38 +0000 Subject: [PATCH] add/fix comments fix declaration of krb5_kdc_rep_decrypt_proc for ANSI C prototype compatibility git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@324 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/krb/kdc_rep_dc.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/src/lib/krb5/krb/kdc_rep_dc.c b/src/lib/krb5/krb/kdc_rep_dc.c index 7dfdfad7d..29d2a68d2 100644 --- a/src/lib/krb5/krb/kdc_rep_dc.c +++ b/src/lib/krb5/krb/kdc_rep_dc.c @@ -7,7 +7,7 @@ * For copying and distribution information, please see the file * . * - * krb5_kdc_rep_tkt_decrypt() + * krb5_kdc_rep_decrypt_proc() */ #if !defined(lint) && !defined(SABER) @@ -21,12 +21,20 @@ static char rcsid_kdc_rep_dc_c [] = #include #include +/* + * Decrypt the encrypted portion of the KDC_REP message, using the key + * passed. + * + */ + /*ARGSUSED*/ krb5_error_code -krb5_kdc_rep_decrypt_proc(dec_rep, key, decryptarg) -krb5_kdc_rep *dec_rep; -krb5_keyblock *key; -krb5_pointer decryptarg; +krb5_kdc_rep_decrypt_proc(DECLARG(krb5_keyblock *, key), + DECLARG(krb5_pointer, decryptarg), + DECLARG(krb5_kdc_rep *, dec_rep)) +OLDDECLARG(krb5_keyblock *, key) +OLDDECLARG(krb5_pointer, decryptarg) +OLDDECLARG(krb5_kdc_rep *, dec_rep) { krb5_error_code retval; krb5_encrypt_block eblock; @@ -34,7 +42,9 @@ krb5_pointer decryptarg; krb5_enc_kdc_rep_part *local_encpart; if (!valid_etype(dec_rep->etype)) - return KRB5KDC_ERR_ETYPE_NOSUPP; + return KRB5KDC_ERR_ETYPE_NOSUPP; /* XXX */ + + /* set up scratch decrypt/decode area */ scratch.length = dec_rep->enc_part.length; if (!(scratch.data = malloc(dec_rep->enc_part.length))) { @@ -51,7 +61,7 @@ krb5_pointer decryptarg; return(retval); } - /* call the encryption routine */ + /* call the decryption routine */ if (retval = (*eblock.crypto_entry->decrypt_func)((krb5_pointer) dec_rep->enc_part.data, (krb5_pointer) scratch.data, @@ -65,6 +75,8 @@ krb5_pointer decryptarg; clean_scratch(); return retval; } + + /* and do the decode */ retval = decode_krb5_enc_kdc_rep_part(&scratch, &local_encpart); clean_scratch(); if (retval) -- 2.26.2