]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - crypto/heimdal/doc/doxyout/krb5/man/man3/krb5_credential.3
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / crypto / heimdal / doc / doxyout / krb5 / man / man3 / krb5_credential.3
1 .TH "Heimdal Kerberos 5 credential handing functions" 3 "11 Jan 2012" "Version 1.5.2" "HeimdalKerberos5library" \" -*- nroff -*-
2 .ad l
3 .nh
4 .SH NAME
5 Heimdal Kerberos 5 credential handing functions \- 
6 .SS "Functions"
7
8 .in +1c
9 .ti -1c
10 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_fwd_tgt_creds\fP (krb5_context context, krb5_auth_context auth_context, const char *hostname, krb5_principal client, krb5_principal server, krb5_ccache ccache, int forwardable, krb5_data *out_data)"
11 .br
12 .ti -1c
13 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_get_forwarded_creds\fP (krb5_context context, krb5_auth_context auth_context, krb5_ccache ccache, krb5_flags flags, const char *hostname, krb5_creds *in_creds, krb5_data *out_data)"
14 .br
15 .ti -1c
16 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_get_init_creds_opt_alloc\fP (krb5_context context, krb5_get_init_creds_opt **opt)"
17 .br
18 .ti -1c
19 .RI "KRB5_LIB_FUNCTION void KRB5_LIB_CALL \fBkrb5_get_init_creds_opt_free\fP (krb5_context context, krb5_get_init_creds_opt *opt)"
20 .br
21 .ti -1c
22 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_init_creds_init\fP (krb5_context context, krb5_principal client, krb5_prompter_fct prompter, void *prompter_data, krb5_deltat start_time, krb5_get_init_creds_opt *options, krb5_init_creds_context *rctx)"
23 .br
24 .ti -1c
25 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_init_creds_set_service\fP (krb5_context context, krb5_init_creds_context ctx, const char *service)"
26 .br
27 .ti -1c
28 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_init_creds_set_password\fP (krb5_context context, krb5_init_creds_context ctx, const char *password)"
29 .br
30 .ti -1c
31 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_init_creds_set_keytab\fP (krb5_context context, krb5_init_creds_context ctx, krb5_keytab keytab)"
32 .br
33 .ti -1c
34 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_init_creds_step\fP (krb5_context context, krb5_init_creds_context ctx, krb5_data *in, krb5_data *out, krb5_krbhst_info *hostinfo, unsigned int *flags)"
35 .br
36 .ti -1c
37 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_init_creds_get_error\fP (krb5_context context, krb5_init_creds_context ctx, KRB_ERROR *error)"
38 .br
39 .ti -1c
40 .RI "KRB5_LIB_FUNCTION void KRB5_LIB_CALL \fBkrb5_init_creds_free\fP (krb5_context context, krb5_init_creds_context ctx)"
41 .br
42 .ti -1c
43 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_init_creds_get\fP (krb5_context context, krb5_init_creds_context ctx)"
44 .br
45 .ti -1c
46 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_get_init_creds_password\fP (krb5_context context, krb5_creds *creds, krb5_principal client, const char *password, krb5_prompter_fct prompter, void *data, krb5_deltat start_time, const char *in_tkt_service, krb5_get_init_creds_opt *options)"
47 .br
48 .ti -1c
49 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_get_init_creds_keyblock\fP (krb5_context context, krb5_creds *creds, krb5_principal client, krb5_keyblock *keyblock, krb5_deltat start_time, const char *in_tkt_service, krb5_get_init_creds_opt *options)"
50 .br
51 .ti -1c
52 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_get_init_creds_keytab\fP (krb5_context context, krb5_creds *creds, krb5_principal client, krb5_keytab keytab, krb5_deltat start_time, const char *in_tkt_service, krb5_get_init_creds_opt *options)"
53 .br
54 .in -1c
55 .SH "Detailed Description"
56 .PP 
57
58 .SH "Function Documentation"
59 .PP 
60 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_fwd_tgt_creds (krb5_context context, krb5_auth_context auth_context, const char * hostname, krb5_principal client, krb5_principal server, krb5_ccache ccache, int forwardable, krb5_data * out_data)"
61 .PP
62 Forward credentials for client to host hostname , making them forwardable if forwardable, and returning the blob of data to sent in out_data. If hostname == NULL, pick it from server.
63 .PP
64 \fBParameters:\fP
65 .RS 4
66 \fIcontext\fP A kerberos 5 context. 
67 .br
68 \fIauth_context\fP the auth context with the key to encrypt the out_data. 
69 .br
70 \fIhostname\fP the host to forward the tickets too. 
71 .br
72 \fIclient\fP the client to delegate from. 
73 .br
74 \fIserver\fP the server to delegate the credential too. 
75 .br
76 \fIccache\fP credential cache to use. 
77 .br
78 \fIforwardable\fP make the forwarded ticket forwabledable. 
79 .br
80 \fIout_data\fP the resulting credential.
81 .RE
82 .PP
83 \fBReturns:\fP
84 .RS 4
85 Return an error code or 0. 
86 .RE
87 .PP
88
89 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_get_forwarded_creds (krb5_context context, krb5_auth_context auth_context, krb5_ccache ccache, krb5_flags flags, const char * hostname, krb5_creds * in_creds, krb5_data * out_data)"
90 .PP
91 Gets tickets forwarded to hostname. If the tickets that are forwarded are address-less, the forwarded tickets will also be address-less.
92 .PP
93 If the ticket have any address, hostname will be used for figure out the address to forward the ticket too. This since this might use DNS, its insecure and also doesn't represent configured all addresses of the host. For example, the host might have two adresses, one IPv4 and one IPv6 address where the later is not published in DNS. This IPv6 address might be used communications and thus the resulting ticket useless.
94 .PP
95 \fBParameters:\fP
96 .RS 4
97 \fIcontext\fP A kerberos 5 context. 
98 .br
99 \fIauth_context\fP the auth context with the key to encrypt the out_data. 
100 .br
101 \fIccache\fP credential cache to use 
102 .br
103 \fIflags\fP the flags to control the resulting ticket flags 
104 .br
105 \fIhostname\fP the host to forward the tickets too. 
106 .br
107 \fIin_creds\fP the in client and server ticket names. The client and server components forwarded to the remote host. 
108 .br
109 \fIout_data\fP the resulting credential.
110 .RE
111 .PP
112 \fBReturns:\fP
113 .RS 4
114 Return an error code or 0. 
115 .RE
116 .PP
117
118 .PP
119 Some older of the MIT gssapi library used clear-text tickets (warped inside AP-REQ encryption), use the krb5_auth_context flag KRB5_AUTH_CONTEXT_CLEAR_FORWARDED_CRED to support those tickets. The session key is used otherwise to encrypt the forwarded ticket. 
120 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_get_init_creds_keyblock (krb5_context context, krb5_creds * creds, krb5_principal client, krb5_keyblock * keyblock, krb5_deltat start_time, const char * in_tkt_service, krb5_get_init_creds_opt * options)"
121 .PP
122 Get new credentials using keyblock. 
123 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_get_init_creds_keytab (krb5_context context, krb5_creds * creds, krb5_principal client, krb5_keytab keytab, krb5_deltat start_time, const char * in_tkt_service, krb5_get_init_creds_opt * options)"
124 .PP
125 Get new credentials using keytab. 
126 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_get_init_creds_opt_alloc (krb5_context context, krb5_get_init_creds_opt ** opt)"
127 .PP
128 Allocate a new krb5_get_init_creds_opt structure, free with \fBkrb5_get_init_creds_opt_free()\fP. 
129 .SS "KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_get_init_creds_opt_free (krb5_context context, krb5_get_init_creds_opt * opt)"
130 .PP
131 Free krb5_get_init_creds_opt structure. 
132 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_get_init_creds_password (krb5_context context, krb5_creds * creds, krb5_principal client, const char * password, krb5_prompter_fct prompter, void * data, krb5_deltat start_time, const char * in_tkt_service, krb5_get_init_creds_opt * options)"
133 .PP
134 Get new credentials using password. 
135 .SS "KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_init_creds_free (krb5_context context, krb5_init_creds_context ctx)"
136 .PP
137 Free the krb5_init_creds_context allocated by \fBkrb5_init_creds_init()\fP.
138 .PP
139 \fBParameters:\fP
140 .RS 4
141 \fIcontext\fP A Kerberos 5 context. 
142 .br
143 \fIctx\fP The krb5_init_creds_context to free. 
144 .RE
145 .PP
146
147 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_init_creds_get (krb5_context context, krb5_init_creds_context ctx)"
148 .PP
149 Get new credentials as setup by the krb5_init_creds_context.
150 .PP
151 \fBParameters:\fP
152 .RS 4
153 \fIcontext\fP A Kerberos 5 context. 
154 .br
155 \fIctx\fP The krb5_init_creds_context to process. 
156 .RE
157 .PP
158
159 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_init_creds_get_error (krb5_context context, krb5_init_creds_context ctx, KRB_ERROR * error)"
160 .PP
161 Get the last error from the transaction.
162 .PP
163 \fBReturns:\fP
164 .RS 4
165 Returns 0 or an error code 
166 .RE
167 .PP
168
169 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_init_creds_init (krb5_context context, krb5_principal client, krb5_prompter_fct prompter, void * prompter_data, krb5_deltat start_time, krb5_get_init_creds_opt * options, krb5_init_creds_context * rctx)"
170 .PP
171 Start a new context to get a new initial credential.
172 .PP
173 \fBParameters:\fP
174 .RS 4
175 \fIcontext\fP A Kerberos 5 context. 
176 .br
177 \fIclient\fP The Kerberos principal to get the credential for, if NULL is given, the default principal is used as determined by krb5_get_default_principal(). 
178 .br
179 \fIprompter\fP 
180 .br
181 \fIprompter_data\fP 
182 .br
183 \fIstart_time\fP the time the ticket should start to be valid or 0 for now. 
184 .br
185 \fIoptions\fP a options structure, can be NULL for default options. 
186 .br
187 \fIrctx\fP A new allocated free with \fBkrb5_init_creds_free()\fP.
188 .RE
189 .PP
190 \fBReturns:\fP
191 .RS 4
192 0 for success or an Kerberos 5 error code, see krb5_get_error_message(). 
193 .RE
194 .PP
195
196 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_init_creds_set_keytab (krb5_context context, krb5_init_creds_context ctx, krb5_keytab keytab)"
197 .PP
198 Set the keytab to use for authentication.
199 .PP
200 \fBParameters:\fP
201 .RS 4
202 \fIcontext\fP a Kerberos 5 context. 
203 .br
204 \fIctx\fP ctx krb5_init_creds_context context. 
205 .br
206 \fIkeytab\fP the keytab to read the key from.
207 .RE
208 .PP
209 \fBReturns:\fP
210 .RS 4
211 0 for success, or an Kerberos 5 error code, see krb5_get_error_message(). 
212 .RE
213 .PP
214
215 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_init_creds_set_password (krb5_context context, krb5_init_creds_context ctx, const char * password)"
216 .PP
217 Sets the password that will use for the request.
218 .PP
219 \fBParameters:\fP
220 .RS 4
221 \fIcontext\fP a Kerberos 5 context. 
222 .br
223 \fIctx\fP ctx krb5_init_creds_context context. 
224 .br
225 \fIpassword\fP the password to use.
226 .RE
227 .PP
228 \fBReturns:\fP
229 .RS 4
230 0 for success, or an Kerberos 5 error code, see krb5_get_error_message(). 
231 .RE
232 .PP
233
234 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_init_creds_set_service (krb5_context context, krb5_init_creds_context ctx, const char * service)"
235 .PP
236 Sets the service that the is requested. This call is only neede for special initial tickets, by default the a krbtgt is fetched in the default realm.
237 .PP
238 \fBParameters:\fP
239 .RS 4
240 \fIcontext\fP a Kerberos 5 context. 
241 .br
242 \fIctx\fP a krb5_init_creds_context context. 
243 .br
244 \fIservice\fP the service given as a string, for example 'kadmind/admin'. If NULL, the default krbtgt in the clients realm is set.
245 .RE
246 .PP
247 \fBReturns:\fP
248 .RS 4
249 0 for success, or an Kerberos 5 error code, see krb5_get_error_message(). 
250 .RE
251 .PP
252
253 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_init_creds_step (krb5_context context, krb5_init_creds_context ctx, krb5_data * in, krb5_data * out, krb5_krbhst_info * hostinfo, unsigned int * flags)"
254 .PP
255 The core loop if krb5_get_init_creds() function family. Create the packets and have the caller send them off to the KDC.
256 .PP
257 If the caller want all work been done for them, use \fBkrb5_init_creds_get()\fP instead.
258 .PP
259 \fBParameters:\fP
260 .RS 4
261 \fIcontext\fP a Kerberos 5 context. 
262 .br
263 \fIctx\fP ctx krb5_init_creds_context context. 
264 .br
265 \fIin\fP input data from KDC, first round it should be reset by krb5_data_zer(). 
266 .br
267 \fIout\fP reply to KDC. 
268 .br
269 \fIhostinfo\fP KDC address info, first round it can be NULL. 
270 .br
271 \fIflags\fP status of the round, if KRB5_INIT_CREDS_STEP_FLAG_CONTINUE is set, continue one more round.
272 .RE
273 .PP
274 \fBReturns:\fP
275 .RS 4
276 0 for success, or an Kerberos 5 error code, see krb5_get_error_message(). 
277 .RE
278 .PP
279