* 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)
#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;
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))) {
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,
clean_scratch();
return retval;
}
+
+ /* and do the decode */
retval = decode_krb5_enc_kdc_rep_part(&scratch, &local_encpart);
clean_scratch();
if (retval)