]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - crypto/heimdal/lib/krb5/krb5_ticket.3
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / crypto / heimdal / lib / krb5 / krb5_ticket.3
1 .\" Copyright (c) 2003 - 2004 Kungliga Tekniska Högskolan
2 .\" (Royal Institute of Technology, Stockholm, Sweden).
3 .\" All rights reserved.
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
8 .\"
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\"    notice, this list of conditions and the following disclaimer.
11 .\"
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\"    notice, this list of conditions and the following disclaimer in the
14 .\"    documentation and/or other materials provided with the distribution.
15 .\"
16 .\" 3. Neither the name of the Institute nor the names of its contributors
17 .\"    may be used to endorse or promote products derived from this software
18 .\"    without specific prior written permission.
19 .\"
20 .\" THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" SUCH DAMAGE.
31 .\"
32 .\" $Id: krb5_ticket.3 19543 2006-12-28 20:48:50Z lha $
33 .\"
34 .Dd May  1, 2006
35 .Dt KRB5_TICKET 3
36 .Os HEIMDAL
37 .Sh NAME
38 .Nm krb5_ticket ,
39 .Nm krb5_free_ticket ,
40 .Nm krb5_copy_ticket ,
41 .Nm krb5_ticket_get_authorization_data_type ,
42 .Nm krb5_ticket_get_client ,
43 .Nm krb5_ticket_get_server ,
44 .Nm krb5_ticket_get_endtime
45 .Nd Kerberos 5 ticket access and handling functions
46 .Sh LIBRARY
47 Kerberos 5 Library (libkrb5, -lkrb5)
48 .Sh SYNOPSIS
49 .In krb5.h
50 .Pp
51 .Li krb5_ticket ;
52 .Pp
53 .Ft krb5_error_code
54 .Fo krb5_free_ticket
55 .Fa "krb5_context context"
56 .Fa "krb5_ticket *ticket"
57 .Fc
58 .Ft krb5_error_code
59 .Fo krb5_copy_ticket
60 .Fa "krb5_context context"
61 .Fa "const krb5_ticket *from"
62 .Fa "krb5_ticket **to"
63 .Fc
64 .Ft krb5_error_code
65 .Fo krb5_ticket_get_authorization_data_type
66 .Fa "krb5_context context"
67 .Fa "krb5_ticket *ticket"
68 .Fa "int type"
69 .Fa "krb5_data *data"
70 .Fc
71 .Ft krb5_error_code
72 .Fo krb5_ticket_get_client
73 .Fa "krb5_context context"
74 .Fa "const krb5_ticket *ticket"
75 .Fa "krb5_principal *client"
76 .Fc
77 .Ft krb5_error_code
78 .Fo krb5_ticket_get_server
79 .Fa "krb5_context context"
80 .Fa "const krb5_ticket *ticket"
81 .Fa "krb5_principal *server"
82 .Fc
83 .Ft time_t
84 .Fo krb5_ticket_get_endtime
85 .Fa "krb5_context context"
86 .Fa "const krb5_ticket *ticket"
87 .Fc
88 .Sh DESCRIPTION
89 .Li krb5_ticket
90 holds a kerberos ticket.
91 The internals of the structure should never be accessed directly,
92 functions exist for extracting information.
93 .Pp
94 .Fn krb5_free_ticket
95 frees the
96 .Fa ticket
97 and its content.
98 Used to free the result of
99 .Fn krb5_copy_ticket
100 and
101 .Fn krb5_recvauth .
102 .Pp
103 .Fn krb5_copy_ticket
104 copies the content of the ticket
105 .Fa from
106 to the ticket
107 .Fa to .
108 The result
109 .Fa to
110 should be freed with
111 .Fn krb5_free_ticket .
112 .Pp
113 .Fn krb5_ticket_get_authorization_data_type
114 fetches the authorization data of the type
115 .Fa type
116 from the
117 .Fa ticket .
118 If there isn't any authorization data of type
119 .Fa type ,
120 .Dv ENOENT
121 is returned.
122 .Fa data
123 needs to be freed with
124 .Fn krb5_data_free
125 on success.
126 .Pp
127 .Fn krb5_ticket_get_client
128 and
129 .Fn krb5_ticket_get_server
130 returns a copy of the client/server principal from the ticket.
131 The principal returned should be free using
132 .Xr krb5_free_principal 3 .
133 .Pp
134 .Fn krb5_ticket_get_endtime
135 return the end time of the ticket.
136 .Sh SEE ALSO
137 .Xr krb5 3