rd_cred.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <k5-int.h>
#include "cleanup.h"
#include <auth_con.h>
#include <stddef.h> /* NULL */
#include <stdlib.h> /* malloc */
#include <errno.h> /* ENOMEM */
/*-------------------- decrypt_credencdata --------------------*/
/*
* decrypt the enc_part of a krb5_cred
*/
/*ARGSUSED*/
static krb5_error_code
{
return ENOMEM;
goto cleanup;
} else {
}
/* now decode the decrypted stuff */
goto cleanup;
/* this is a struct copy so ppart must be freed */
retval = 0;
}
return retval;
}
/*----------------------- krb5_rd_cred_basic -----------------------*/
static krb5_error_code
krb5_creds *** pppcreds)
{
krb5_int32 i = 0;
/* decode cred message */
return retval;
goto cleanup_cred;
/*
* Allocate the list of creds. The memory is allocated so that
* krb5_free_tgt_creds can be used to free the list.
*/
if ((*pppcreds =
goto cleanup_cred;
}
/*
* For each credential, create a strcture in the list of
* credentials and copy the information.
*/
while (i < ncreds) {
krb5_creds * pcur;
goto cleanup;
}
(*pppcreds)[i+1] = 0;
goto cleanup;
goto cleanup;
goto cleanup;
goto cleanup;
goto cleanup;
}
/*
* NULL terminate the list
*/
if (retval)
return retval;
}
/*----------------------- krb5_rd_cred -----------------------*/
/*
* This functions takes as input an KRB_CRED message, validates it, and
* outputs the nonce and an array of the forwarded credentials.
*/
krb5_creds * * * pppcreds,
{
/* Get keyblock */
/* Need a better error */
return KRB5_RC_REQUIRED;
return KRB5_RC_REQUIRED;
/*
* If decrypting with the first keyblock we try fails, perhaps the
* credentials are stored in the session key so try decrypting with
* that.
*/
&replaydata, pppcreds))) {
&replaydata, pppcreds))) {
return retval;
}
}
goto error;
goto error;
}
goto error;
goto error;
}
}
goto error;
}
}
}
if (retval) {
}
return retval;
}