add/fix comments
authorJohn Kohl <jtkohl@mit.edu>
Thu, 8 Feb 1990 10:19:38 +0000 (10:19 +0000)
committerJohn Kohl <jtkohl@mit.edu>
Thu, 8 Feb 1990 10:19:38 +0000 (10:19 +0000)
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

index 7dfdfad7d20ad341ce70df7945404483b31f0fec..29d2a68d28d6a211acab6600d60713ab6e0647c7 100644 (file)
@@ -7,7 +7,7 @@
  * For copying and distribution information, please see the file
  * <krb5/mit-copyright.h>.
  *
- * 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 <krb5/ext-proto.h>
 #include <errno.h>
 
+/*
+ * 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)