10Sstevel@tonic-gate /*
20Sstevel@tonic-gate * lib/krb5/krb/tgtname.c
30Sstevel@tonic-gate *
40Sstevel@tonic-gate * Copyright 1990 by the Massachusetts Institute of Technology.
50Sstevel@tonic-gate * All Rights Reserved.
60Sstevel@tonic-gate *
70Sstevel@tonic-gate * Export of this software from the United States of America may
80Sstevel@tonic-gate * require a specific license from the United States Government.
90Sstevel@tonic-gate * It is the responsibility of any person or organization contemplating
100Sstevel@tonic-gate * export to obtain such a license before exporting.
110Sstevel@tonic-gate *
120Sstevel@tonic-gate * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
130Sstevel@tonic-gate * distribute this software and its documentation for any purpose and
140Sstevel@tonic-gate * without fee is hereby granted, provided that the above copyright
150Sstevel@tonic-gate * notice appear in all copies and that both that copyright notice and
160Sstevel@tonic-gate * this permission notice appear in supporting documentation, and that
170Sstevel@tonic-gate * the name of M.I.T. not be used in advertising or publicity pertaining
180Sstevel@tonic-gate * to distribution of the software without specific, written prior
19*7934SMark.Phalan@Sun.COM * permission. Furthermore if you modify this software you must label
20*7934SMark.Phalan@Sun.COM * your software as modified software and not distribute it in such a
21*7934SMark.Phalan@Sun.COM * fashion that it might be confused with the original M.I.T. software.
22*7934SMark.Phalan@Sun.COM * M.I.T. makes no representations about the suitability of
230Sstevel@tonic-gate * this software for any purpose. It is provided "as is" without express
240Sstevel@tonic-gate * or implied warranty.
250Sstevel@tonic-gate *
260Sstevel@tonic-gate *
270Sstevel@tonic-gate * krb5_tgtname()
280Sstevel@tonic-gate */
290Sstevel@tonic-gate
300Sstevel@tonic-gate #include "k5-int.h"
31781Sgtb #include "int-proto.h"
320Sstevel@tonic-gate
330Sstevel@tonic-gate /* This is an internal-only function, used by krb5_get_cred_from_kdc() */
340Sstevel@tonic-gate
350Sstevel@tonic-gate krb5_error_code
krb5_tgtname(krb5_context context,const krb5_data * server,const krb5_data * client,krb5_principal * tgtprinc)36781Sgtb krb5_tgtname(krb5_context context, const krb5_data *server, const krb5_data *client, krb5_principal *tgtprinc)
370Sstevel@tonic-gate {
380Sstevel@tonic-gate return krb5_build_principal_ext(context, tgtprinc, client->length, client->data,
390Sstevel@tonic-gate KRB5_TGS_NAME_SIZE, KRB5_TGS_NAME,
400Sstevel@tonic-gate server->length, server->data,
410Sstevel@tonic-gate 0);
420Sstevel@tonic-gate }
43