rc_conv.c revision 505d05c73a6e56769f263d4803b22eddd168ee24
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* lib/krb5/rcache/rc_conv.c
*
* This file of the Kerberos V5 software is derived from public-domain code
* contributed by Daniel J. Bernstein, <brnstnd@acf10.nyu.edu>.
*
*/
/*
* An implementation for the default replay cache type.
*/
#include "rc_base.h"
/*
Local stuff:
krb5_auth_to_replay(context, krb5_tkt_authent *auth,krb5_donot_replay *rep)
given auth, take important information and make rep; return -1 if failed
*/
krb5_error_code
krb5_auth_to_rep(krb5_context context, krb5_tkt_authent *auth, krb5_donot_replay *rep)
{
krb5_error_code retval;
rep->cusec = auth->authenticator->cusec;
rep->ctime = auth->authenticator->ctime;
if ((retval = krb5_unparse_name(context, auth->ticket->server, &rep->server)))
return retval; /* shouldn't happen */
if ((retval = krb5_unparse_name(context, auth->authenticator->client,
&rep->client))) {
free(rep->server);
return retval; /* shouldn't happen. */
}
return 0;
}