]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - crypto/heimdal/doc/doxyout/krb5/man/man3/krb5_ccache.3
- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
[FreeBSD/releng/10.2.git] / crypto / heimdal / doc / doxyout / krb5 / man / man3 / krb5_ccache.3
1 .TH "Heimdal Kerberos 5 credential cache functions" 3 "11 Jan 2012" "Version 1.5.2" "HeimdalKerberos5library" \" -*- nroff -*-
2 .ad l
3 .nh
4 .SH NAME
5 Heimdal Kerberos 5 credential cache functions \- 
6 .SS "Functions"
7
8 .in +1c
9 .ti -1c
10 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_register\fP (krb5_context context, const krb5_cc_ops *ops, krb5_boolean override)"
11 .br
12 .ti -1c
13 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_resolve\fP (krb5_context context, const char *name, krb5_ccache *id)"
14 .br
15 .ti -1c
16 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_new_unique\fP (krb5_context context, const char *type, const char *hint, krb5_ccache *id)"
17 .br
18 .ti -1c
19 .RI "KRB5_LIB_FUNCTION const char *KRB5_LIB_CALL \fBkrb5_cc_get_name\fP (krb5_context context, krb5_ccache id)"
20 .br
21 .ti -1c
22 .RI "KRB5_LIB_FUNCTION const char *KRB5_LIB_CALL \fBkrb5_cc_get_type\fP (krb5_context context, krb5_ccache id)"
23 .br
24 .ti -1c
25 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_get_full_name\fP (krb5_context context, krb5_ccache id, char **str)"
26 .br
27 .ti -1c
28 .RI "KRB5_LIB_FUNCTION const krb5_cc_ops *KRB5_LIB_CALL \fBkrb5_cc_get_ops\fP (krb5_context context, krb5_ccache id)"
29 .br
30 .ti -1c
31 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_switch\fP (krb5_context context, krb5_ccache id)"
32 .br
33 .ti -1c
34 .RI "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL \fBkrb5_cc_support_switch\fP (krb5_context context, const char *type)"
35 .br
36 .ti -1c
37 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_set_default_name\fP (krb5_context context, const char *name)"
38 .br
39 .ti -1c
40 .RI "KRB5_LIB_FUNCTION const char *KRB5_LIB_CALL \fBkrb5_cc_default_name\fP (krb5_context context)"
41 .br
42 .ti -1c
43 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_default\fP (krb5_context context, krb5_ccache *id)"
44 .br
45 .ti -1c
46 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_initialize\fP (krb5_context context, krb5_ccache id, krb5_principal primary_principal)"
47 .br
48 .ti -1c
49 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_destroy\fP (krb5_context context, krb5_ccache id)"
50 .br
51 .ti -1c
52 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_close\fP (krb5_context context, krb5_ccache id)"
53 .br
54 .ti -1c
55 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_store_cred\fP (krb5_context context, krb5_ccache id, krb5_creds *creds)"
56 .br
57 .ti -1c
58 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_retrieve_cred\fP (krb5_context context, krb5_ccache id, krb5_flags whichfields, const krb5_creds *mcreds, krb5_creds *creds)"
59 .br
60 .ti -1c
61 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_get_principal\fP (krb5_context context, krb5_ccache id, krb5_principal *principal)"
62 .br
63 .ti -1c
64 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_start_seq_get\fP (krb5_context context, const krb5_ccache id, krb5_cc_cursor *cursor)"
65 .br
66 .ti -1c
67 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_next_cred\fP (krb5_context context, const krb5_ccache id, krb5_cc_cursor *cursor, krb5_creds *creds)"
68 .br
69 .ti -1c
70 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_end_seq_get\fP (krb5_context context, const krb5_ccache id, krb5_cc_cursor *cursor)"
71 .br
72 .ti -1c
73 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_remove_cred\fP (krb5_context context, krb5_ccache id, krb5_flags which, krb5_creds *cred)"
74 .br
75 .ti -1c
76 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_set_flags\fP (krb5_context context, krb5_ccache id, krb5_flags flags)"
77 .br
78 .ti -1c
79 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_get_flags\fP (krb5_context context, krb5_ccache id, krb5_flags *flags)"
80 .br
81 .ti -1c
82 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_copy_match_f\fP (krb5_context context, const krb5_ccache from, krb5_ccache to, krb5_boolean(*match)(krb5_context, void *, const krb5_creds *), void *matchctx, unsigned int *matched)"
83 .br
84 .ti -1c
85 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_copy_cache\fP (krb5_context context, const krb5_ccache from, krb5_ccache to)"
86 .br
87 .ti -1c
88 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_get_version\fP (krb5_context context, const krb5_ccache id)"
89 .br
90 .ti -1c
91 .RI "KRB5_LIB_FUNCTION void KRB5_LIB_CALL \fBkrb5_cc_clear_mcred\fP (krb5_creds *mcred)"
92 .br
93 .ti -1c
94 .RI "KRB5_LIB_FUNCTION const krb5_cc_ops *KRB5_LIB_CALL \fBkrb5_cc_get_prefix_ops\fP (krb5_context context, const char *prefix)"
95 .br
96 .ti -1c
97 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_cache_get_first\fP (krb5_context context, const char *type, krb5_cc_cache_cursor *cursor)"
98 .br
99 .ti -1c
100 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_cache_next\fP (krb5_context context, krb5_cc_cache_cursor cursor, krb5_ccache *id)"
101 .br
102 .ti -1c
103 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_cache_end_seq_get\fP (krb5_context context, krb5_cc_cache_cursor cursor)"
104 .br
105 .ti -1c
106 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_cache_match\fP (krb5_context context, krb5_principal client, krb5_ccache *id)"
107 .br
108 .ti -1c
109 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_move\fP (krb5_context context, krb5_ccache from, krb5_ccache to)"
110 .br
111 .ti -1c
112 .RI "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL \fBkrb5_is_config_principal\fP (krb5_context context, krb5_const_principal principal)"
113 .br
114 .ti -1c
115 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_set_config\fP (krb5_context context, krb5_ccache id, krb5_const_principal principal, const char *name, krb5_data *data)"
116 .br
117 .ti -1c
118 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_get_config\fP (krb5_context context, krb5_ccache id, krb5_const_principal principal, const char *name, krb5_data *data)"
119 .br
120 .ti -1c
121 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cccol_cursor_new\fP (krb5_context context, krb5_cccol_cursor *cursor)"
122 .br
123 .ti -1c
124 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cccol_cursor_next\fP (krb5_context context, krb5_cccol_cursor cursor, krb5_ccache *cache)"
125 .br
126 .ti -1c
127 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cccol_cursor_free\fP (krb5_context context, krb5_cccol_cursor *cursor)"
128 .br
129 .ti -1c
130 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_last_change_time\fP (krb5_context context, krb5_ccache id, krb5_timestamp *mtime)"
131 .br
132 .ti -1c
133 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cccol_last_change_time\fP (krb5_context context, const char *type, krb5_timestamp *mtime)"
134 .br
135 .ti -1c
136 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_get_friendly_name\fP (krb5_context context, krb5_ccache id, char **name)"
137 .br
138 .ti -1c
139 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_set_friendly_name\fP (krb5_context context, krb5_ccache id, const char *name)"
140 .br
141 .ti -1c
142 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_get_lifetime\fP (krb5_context context, krb5_ccache id, time_t *t)"
143 .br
144 .ti -1c
145 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_set_kdc_offset\fP (krb5_context context, krb5_ccache id, krb5_deltat offset)"
146 .br
147 .ti -1c
148 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_get_kdc_offset\fP (krb5_context context, krb5_ccache id, krb5_deltat *offset)"
149 .br
150 .ti -1c
151 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_gen_new\fP (krb5_context context, const krb5_cc_ops *ops, krb5_ccache *id) KRB5_DEPRECATED_FUNCTION('Use X instead')"
152 .br
153 .ti -1c
154 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_cc_copy_creds\fP (krb5_context context, const krb5_ccache from, krb5_ccache to)"
155 .br
156 .ti -1c
157 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_get_validated_creds\fP (krb5_context context, krb5_creds *creds, krb5_principal client, krb5_ccache ccache, char *service)"
158 .br
159 .in -1c
160 .SS "Variables"
161
162 .in +1c
163 .ti -1c
164 .RI "KRB5_LIB_VARIABLE const krb5_cc_ops \fBkrb5_acc_ops\fP"
165 .br
166 .ti -1c
167 .RI "KRB5_LIB_VARIABLE const krb5_cc_ops \fBkrb5_fcc_ops\fP"
168 .br
169 .ti -1c
170 .RI "KRB5_LIB_VARIABLE const krb5_cc_ops \fBkrb5_mcc_ops\fP"
171 .br
172 .in -1c
173 .SH "Detailed Description"
174 .PP 
175
176 .SH "Function Documentation"
177 .PP 
178 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_cache_end_seq_get (krb5_context context, krb5_cc_cache_cursor cursor)"
179 .PP
180 Destroy the cursor `cursor'.
181 .PP
182 \fBReturns:\fP
183 .RS 4
184 Return an error code or 0, see krb5_get_error_message(). 
185 .RE
186 .PP
187
188 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_cache_get_first (krb5_context context, const char * type, krb5_cc_cache_cursor * cursor)"
189 .PP
190 Start iterating over all caches of specified type. See also \fBkrb5_cccol_cursor_new()\fP.
191 .PP
192 \fBParameters:\fP
193 .RS 4
194 \fIcontext\fP A Kerberos 5 context 
195 .br
196 \fItype\fP optional type to iterate over, if NULL, the default cache is used. 
197 .br
198 \fIcursor\fP cursor should be freed with \fBkrb5_cc_cache_end_seq_get()\fP.
199 .RE
200 .PP
201 \fBReturns:\fP
202 .RS 4
203 Return an error code or 0, see krb5_get_error_message(). 
204 .RE
205 .PP
206
207 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_cache_match (krb5_context context, krb5_principal client, krb5_ccache * id)"
208 .PP
209 Search for a matching credential cache that have the `principal' as the default principal. On success, `id' needs to be freed with \fBkrb5_cc_close()\fP or \fBkrb5_cc_destroy()\fP.
210 .PP
211 \fBParameters:\fP
212 .RS 4
213 \fIcontext\fP A Kerberos 5 context 
214 .br
215 \fIclient\fP The principal to search for 
216 .br
217 \fIid\fP the returned credential cache
218 .RE
219 .PP
220 \fBReturns:\fP
221 .RS 4
222 On failure, error code is returned and `id' is set to NULL. 
223 .RE
224 .PP
225
226 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_cache_next (krb5_context context, krb5_cc_cache_cursor cursor, krb5_ccache * id)"
227 .PP
228 Retrieve the next cache pointed to by (`cursor') in `id' and advance `cursor'.
229 .PP
230 \fBParameters:\fP
231 .RS 4
232 \fIcontext\fP A Kerberos 5 context 
233 .br
234 \fIcursor\fP the iterator cursor, returned by \fBkrb5_cc_cache_get_first()\fP 
235 .br
236 \fIid\fP next ccache
237 .RE
238 .PP
239 \fBReturns:\fP
240 .RS 4
241 Return 0 or an error code. Returns KRB5_CC_END when the end of caches is reached, see krb5_get_error_message(). 
242 .RE
243 .PP
244
245 .SS "KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_cc_clear_mcred (krb5_creds * mcred)"
246 .PP
247 Clear `mcreds' so it can be used with krb5_cc_retrieve_cred 
248 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_close (krb5_context context, krb5_ccache id)"
249 .PP
250 Stop using the ccache `id' and free the related resources.
251 .PP
252 \fBReturns:\fP
253 .RS 4
254 Return an error code or 0, see krb5_get_error_message(). 
255 .RE
256 .PP
257
258 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_copy_cache (krb5_context context, const krb5_ccache from, krb5_ccache to)"
259 .PP
260 Just like \fBkrb5_cc_copy_match_f()\fP, but copy everything.
261 .PP
262
263 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_copy_creds (krb5_context context, const krb5_ccache from, krb5_ccache to)"
264 .PP
265 MIT compat glue 
266 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_copy_match_f (krb5_context context, const krb5_ccache from, krb5_ccache to, krb5_boolean(*)(krb5_context, void *, const krb5_creds *) match, void * matchctx, unsigned int * matched)"
267 .PP
268 Copy the contents of `from' to `to' if the given match function return true.
269 .PP
270 \fBParameters:\fP
271 .RS 4
272 \fIcontext\fP A Kerberos 5 context. 
273 .br
274 \fIfrom\fP the cache to copy data from. 
275 .br
276 \fIto\fP the cache to copy data to. 
277 .br
278 \fImatch\fP a match function that should return TRUE if cred argument should be copied, if NULL, all credentials are copied. 
279 .br
280 \fImatchctx\fP context passed to match function. 
281 .br
282 \fImatched\fP set to true if there was a credential that matched, may be NULL.
283 .RE
284 .PP
285 \fBReturns:\fP
286 .RS 4
287 Return an error code or 0, see krb5_get_error_message(). 
288 .RE
289 .PP
290
291 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_default (krb5_context context, krb5_ccache * id)"
292 .PP
293 Open the default ccache in `id'.
294 .PP
295 \fBReturns:\fP
296 .RS 4
297 Return an error code or 0, see krb5_get_error_message(). 
298 .RE
299 .PP
300
301 .SS "KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL krb5_cc_default_name (krb5_context context)"
302 .PP
303 Return a pointer to a context static string containing the default ccache name.
304 .PP
305 \fBReturns:\fP
306 .RS 4
307 String to the default credential cache name. 
308 .RE
309 .PP
310
311 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_destroy (krb5_context context, krb5_ccache id)"
312 .PP
313 Remove the ccache `id'.
314 .PP
315 \fBReturns:\fP
316 .RS 4
317 Return an error code or 0, see krb5_get_error_message(). 
318 .RE
319 .PP
320
321 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_end_seq_get (krb5_context context, const krb5_ccache id, krb5_cc_cursor * cursor)"
322 .PP
323 Destroy the cursor `cursor'. 
324 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_gen_new (krb5_context context, const krb5_cc_ops * ops, krb5_ccache * id)"
325 .PP
326 Generate a new ccache of type `ops' in `id'.
327 .PP
328 Deprecated: use \fBkrb5_cc_new_unique()\fP instead.
329 .PP
330 \fBReturns:\fP
331 .RS 4
332 Return an error code or 0, see krb5_get_error_message(). 
333 .RE
334 .PP
335
336 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_get_config (krb5_context context, krb5_ccache id, krb5_const_principal principal, const char * name, krb5_data * data)"
337 .PP
338 Get some configuration for the credential cache in the cache.
339 .PP
340 \fBParameters:\fP
341 .RS 4
342 \fIcontext\fP a Keberos context 
343 .br
344 \fIid\fP the credential cache to store the data for 
345 .br
346 \fIprincipal\fP configuration for a specific principal, if NULL, global for the whole cache. 
347 .br
348 \fIname\fP name under which the configuraion is stored. 
349 .br
350 \fIdata\fP data to fetched, free with \fBkrb5_data_free()\fP 
351 .RE
352 .PP
353
354 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_get_flags (krb5_context context, krb5_ccache id, krb5_flags * flags)"
355 .PP
356 Get the flags of `id', store them in `flags'. 
357 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_get_friendly_name (krb5_context context, krb5_ccache id, char ** name)"
358 .PP
359 Return a friendly name on credential cache. Free the result with krb5_xfree().
360 .PP
361 \fBReturns:\fP
362 .RS 4
363 Return an error code or 0, see krb5_get_error_message(). 
364 .RE
365 .PP
366
367 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_get_full_name (krb5_context context, krb5_ccache id, char ** str)"
368 .PP
369 Return the complete resolvable name the cache
370 .PP
371 \fBParameters:\fP
372 .RS 4
373 \fIcontext\fP a Keberos context 
374 .br
375 \fIid\fP return pointer to a found credential cache 
376 .br
377 \fIstr\fP the returned name of a credential cache, free with krb5_xfree()
378 .RE
379 .PP
380 \fBReturns:\fP
381 .RS 4
382 Returns 0 or an error (and then *str is set to NULL). 
383 .RE
384 .PP
385
386 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_get_kdc_offset (krb5_context context, krb5_ccache id, krb5_deltat * offset)"
387 .PP
388 Get the time offset betwen the client and the KDC
389 .PP
390 If the backend doesn't support KDC offset, use the context global setting.
391 .PP
392 \fBParameters:\fP
393 .RS 4
394 \fIcontext\fP A Kerberos 5 context. 
395 .br
396 \fIid\fP a credential cache 
397 .br
398 \fIoffset\fP the offset in seconds
399 .RE
400 .PP
401 \fBReturns:\fP
402 .RS 4
403 Return an error code or 0, see krb5_get_error_message(). 
404 .RE
405 .PP
406
407 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_get_lifetime (krb5_context context, krb5_ccache id, time_t * t)"
408 .PP
409 Get the lifetime of the initial ticket in the cache
410 .PP
411 Get the lifetime of the initial ticket in the cache, if the initial ticket was not found, the error code KRB5_CC_END is returned.
412 .PP
413 \fBParameters:\fP
414 .RS 4
415 \fIcontext\fP A Kerberos 5 context. 
416 .br
417 \fIid\fP a credential cache 
418 .br
419 \fIt\fP the relative lifetime of the initial ticket
420 .RE
421 .PP
422 \fBReturns:\fP
423 .RS 4
424 Return an error code or 0, see krb5_get_error_message(). 
425 .RE
426 .PP
427
428 .SS "KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL krb5_cc_get_name (krb5_context context, krb5_ccache id)"
429 .PP
430 Return the name of the ccache `id' 
431 .SS "KRB5_LIB_FUNCTION const krb5_cc_ops* KRB5_LIB_CALL krb5_cc_get_ops (krb5_context context, krb5_ccache id)"
432 .PP
433 Return krb5_cc_ops of a the ccache `id'. 
434 .SS "KRB5_LIB_FUNCTION const krb5_cc_ops* KRB5_LIB_CALL krb5_cc_get_prefix_ops (krb5_context context, const char * prefix)"
435 .PP
436 Get the cc ops that is registered in `context' to handle the prefix. prefix can be a complete credential cache name or a prefix, the function will only use part up to the first colon (:) if there is one. If prefix the argument is NULL, the default ccache implemtation is returned.
437 .PP
438 \fBReturns:\fP
439 .RS 4
440 Returns NULL if ops not found. 
441 .RE
442 .PP
443
444 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_get_principal (krb5_context context, krb5_ccache id, krb5_principal * principal)"
445 .PP
446 Return the principal of `id' in `principal'.
447 .PP
448 \fBReturns:\fP
449 .RS 4
450 Return an error code or 0, see krb5_get_error_message(). 
451 .RE
452 .PP
453
454 .SS "KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL krb5_cc_get_type (krb5_context context, krb5_ccache id)"
455 .PP
456 Return the type of the ccache `id'. 
457 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_get_version (krb5_context context, const krb5_ccache id)"
458 .PP
459 Return the version of `id'. 
460 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_initialize (krb5_context context, krb5_ccache id, krb5_principal primary_principal)"
461 .PP
462 Create a new ccache in `id' for `primary_principal'.
463 .PP
464 \fBReturns:\fP
465 .RS 4
466 Return an error code or 0, see krb5_get_error_message(). 
467 .RE
468 .PP
469
470 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_last_change_time (krb5_context context, krb5_ccache id, krb5_timestamp * mtime)"
471 .PP
472 Return the last time the credential cache was modified.
473 .PP
474 \fBParameters:\fP
475 .RS 4
476 \fIcontext\fP A Kerberos 5 context 
477 .br
478 \fIid\fP The credential cache to probe 
479 .br
480 \fImtime\fP the last modification time, set to 0 on error.
481 .RE
482 .PP
483 \fBReturns:\fP
484 .RS 4
485 Return 0 or and error. See krb5_get_error_message(). 
486 .RE
487 .PP
488
489 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_move (krb5_context context, krb5_ccache from, krb5_ccache to)"
490 .PP
491 Move the content from one credential cache to another. The operation is an atomic switch.
492 .PP
493 \fBParameters:\fP
494 .RS 4
495 \fIcontext\fP a Keberos context 
496 .br
497 \fIfrom\fP the credential cache to move the content from 
498 .br
499 \fIto\fP the credential cache to move the content to
500 .RE
501 .PP
502 \fBReturns:\fP
503 .RS 4
504 On sucess, from is freed. On failure, error code is returned and from and to are both still allocated, see krb5_get_error_message(). 
505 .RE
506 .PP
507
508 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_new_unique (krb5_context context, const char * type, const char * hint, krb5_ccache * id)"
509 .PP
510 Generates a new unique ccache of `type` in `id'. If `type' is NULL, the library chooses the default credential cache type. The supplied `hint' (that can be NULL) is a string that the credential cache type can use to base the name of the credential on, this is to make it easier for the user to differentiate the credentials.
511 .PP
512 \fBReturns:\fP
513 .RS 4
514 Return an error code or 0, see krb5_get_error_message(). 
515 .RE
516 .PP
517
518 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_next_cred (krb5_context context, const krb5_ccache id, krb5_cc_cursor * cursor, krb5_creds * creds)"
519 .PP
520 Retrieve the next cred pointed to by (`id', `cursor') in `creds' and advance `cursor'.
521 .PP
522 \fBReturns:\fP
523 .RS 4
524 Return an error code or 0, see krb5_get_error_message(). 
525 .RE
526 .PP
527
528 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_register (krb5_context context, const krb5_cc_ops * ops, krb5_boolean override)"
529 .PP
530 Add a new ccache type with operations `ops', overwriting any existing one if `override'.
531 .PP
532 \fBParameters:\fP
533 .RS 4
534 \fIcontext\fP a Keberos context 
535 .br
536 \fIops\fP type of plugin symbol 
537 .br
538 \fIoverride\fP flag to select if the registration is to overide an existing ops with the same name.
539 .RE
540 .PP
541 \fBReturns:\fP
542 .RS 4
543 Return an error code or 0, see krb5_get_error_message(). 
544 .RE
545 .PP
546
547 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_remove_cred (krb5_context context, krb5_ccache id, krb5_flags which, krb5_creds * cred)"
548 .PP
549 Remove the credential identified by `cred', `which' from `id'. 
550 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_resolve (krb5_context context, const char * name, krb5_ccache * id)"
551 .PP
552 Find and allocate a ccache in `id' from the specification in `residual'. If the ccache name doesn't contain any colon, interpret it as a file name.
553 .PP
554 \fBParameters:\fP
555 .RS 4
556 \fIcontext\fP a Keberos context. 
557 .br
558 \fIname\fP string name of a credential cache. 
559 .br
560 \fIid\fP return pointer to a found credential cache.
561 .RE
562 .PP
563 \fBReturns:\fP
564 .RS 4
565 Return 0 or an error code. In case of an error, id is set to NULL, see krb5_get_error_message(). 
566 .RE
567 .PP
568
569 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_retrieve_cred (krb5_context context, krb5_ccache id, krb5_flags whichfields, const krb5_creds * mcreds, krb5_creds * creds)"
570 .PP
571 Retrieve the credential identified by `mcreds' (and `whichfields') from `id' in `creds'. 'creds' must be free by the caller using krb5_free_cred_contents.
572 .PP
573 \fBParameters:\fP
574 .RS 4
575 \fIcontext\fP A Kerberos 5 context 
576 .br
577 \fIid\fP a Kerberos 5 credential cache 
578 .br
579 \fIwhichfields\fP what fields to use for matching credentials, same flags as whichfields in \fBkrb5_compare_creds()\fP 
580 .br
581 \fImcreds\fP template credential to use for comparing 
582 .br
583 \fIcreds\fP returned credential, free with \fBkrb5_free_cred_contents()\fP
584 .RE
585 .PP
586 \fBReturns:\fP
587 .RS 4
588 Return an error code or 0, see krb5_get_error_message(). 
589 .RE
590 .PP
591
592 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_set_config (krb5_context context, krb5_ccache id, krb5_const_principal principal, const char * name, krb5_data * data)"
593 .PP
594 Store some configuration for the credential cache in the cache. Existing configuration under the same name is over-written.
595 .PP
596 \fBParameters:\fP
597 .RS 4
598 \fIcontext\fP a Keberos context 
599 .br
600 \fIid\fP the credential cache to store the data for 
601 .br
602 \fIprincipal\fP configuration for a specific principal, if NULL, global for the whole cache. 
603 .br
604 \fIname\fP name under which the configuraion is stored. 
605 .br
606 \fIdata\fP data to store, if NULL, configure is removed. 
607 .RE
608 .PP
609
610 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_set_default_name (krb5_context context, const char * name)"
611 .PP
612 Set the default cc name for `context' to `name'. 
613 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_set_flags (krb5_context context, krb5_ccache id, krb5_flags flags)"
614 .PP
615 Set the flags of `id' to `flags'. 
616 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_set_friendly_name (krb5_context context, krb5_ccache id, const char * name)"
617 .PP
618 Set the friendly name on credential cache.
619 .PP
620 \fBReturns:\fP
621 .RS 4
622 Return an error code or 0, see krb5_get_error_message(). 
623 .RE
624 .PP
625
626 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_set_kdc_offset (krb5_context context, krb5_ccache id, krb5_deltat offset)"
627 .PP
628 Set the time offset betwen the client and the KDC
629 .PP
630 If the backend doesn't support KDC offset, use the context global setting.
631 .PP
632 \fBParameters:\fP
633 .RS 4
634 \fIcontext\fP A Kerberos 5 context. 
635 .br
636 \fIid\fP a credential cache 
637 .br
638 \fIoffset\fP the offset in seconds
639 .RE
640 .PP
641 \fBReturns:\fP
642 .RS 4
643 Return an error code or 0, see krb5_get_error_message(). 
644 .RE
645 .PP
646
647 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_start_seq_get (krb5_context context, const krb5_ccache id, krb5_cc_cursor * cursor)"
648 .PP
649 Start iterating over `id', `cursor' is initialized to the beginning. Caller must free the cursor with \fBkrb5_cc_end_seq_get()\fP.
650 .PP
651 \fBReturns:\fP
652 .RS 4
653 Return an error code or 0, see krb5_get_error_message(). 
654 .RE
655 .PP
656
657 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_store_cred (krb5_context context, krb5_ccache id, krb5_creds * creds)"
658 .PP
659 Store `creds' in the ccache `id'.
660 .PP
661 \fBReturns:\fP
662 .RS 4
663 Return an error code or 0, see krb5_get_error_message(). 
664 .RE
665 .PP
666
667 .SS "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_cc_support_switch (krb5_context context, const char * type)"
668 .PP
669 Return true if the default credential cache support switch 
670 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cc_switch (krb5_context context, krb5_ccache id)"
671 .PP
672 Switch the default default credential cache for a specific credcache type (and name for some implementations).
673 .PP
674 \fBReturns:\fP
675 .RS 4
676 Return an error code or 0, see krb5_get_error_message(). 
677 .RE
678 .PP
679
680 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cccol_cursor_free (krb5_context context, krb5_cccol_cursor * cursor)"
681 .PP
682 End an iteration and free all resources, can be done before end is reached.
683 .PP
684 \fBParameters:\fP
685 .RS 4
686 \fIcontext\fP A Kerberos 5 context 
687 .br
688 \fIcursor\fP the iteration cursor to be freed.
689 .RE
690 .PP
691 \fBReturns:\fP
692 .RS 4
693 Return 0 or and error, KRB5_CC_END is returned at the end of iteration. See krb5_get_error_message(). 
694 .RE
695 .PP
696
697 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cccol_cursor_new (krb5_context context, krb5_cccol_cursor * cursor)"
698 .PP
699 Get a new cache interation cursor that will interate over all credentials caches independent of type.
700 .PP
701 \fBParameters:\fP
702 .RS 4
703 \fIcontext\fP a Keberos context 
704 .br
705 \fIcursor\fP passed into \fBkrb5_cccol_cursor_next()\fP and free with \fBkrb5_cccol_cursor_free()\fP.
706 .RE
707 .PP
708 \fBReturns:\fP
709 .RS 4
710 Returns 0 or and error code, see krb5_get_error_message(). 
711 .RE
712 .PP
713
714 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cccol_cursor_next (krb5_context context, krb5_cccol_cursor cursor, krb5_ccache * cache)"
715 .PP
716 Get next credential cache from the iteration.
717 .PP
718 \fBParameters:\fP
719 .RS 4
720 \fIcontext\fP A Kerberos 5 context 
721 .br
722 \fIcursor\fP the iteration cursor 
723 .br
724 \fIcache\fP the returned cursor, pointer is set to NULL on failure and a cache on success. The returned cache needs to be freed with \fBkrb5_cc_close()\fP or destroyed with \fBkrb5_cc_destroy()\fP. MIT Kerberos behavies slightly diffrent and sets cache to NULL when all caches are iterated over and return 0.
725 .RE
726 .PP
727 \fBReturns:\fP
728 .RS 4
729 Return 0 or and error, KRB5_CC_END is returned at the end of iteration. See krb5_get_error_message(). 
730 .RE
731 .PP
732
733 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_cccol_last_change_time (krb5_context context, const char * type, krb5_timestamp * mtime)"
734 .PP
735 Return the last modfication time for a cache collection. The query can be limited to a specific cache type. If the function return 0 and mtime is 0, there was no credentials in the caches.
736 .PP
737 \fBParameters:\fP
738 .RS 4
739 \fIcontext\fP A Kerberos 5 context 
740 .br
741 \fItype\fP The credential cache to probe, if NULL, all type are traversed. 
742 .br
743 \fImtime\fP the last modification time, set to 0 on error.
744 .RE
745 .PP
746 \fBReturns:\fP
747 .RS 4
748 Return 0 or and error. See krb5_get_error_message(). 
749 .RE
750 .PP
751
752 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_get_validated_creds (krb5_context context, krb5_creds * creds, krb5_principal client, krb5_ccache ccache, char * service)"
753 .PP
754 Validate the newly fetch credential, see also krb5_verify_init_creds().
755 .PP
756 \fBParameters:\fP
757 .RS 4
758 \fIcontext\fP a Kerberos 5 context 
759 .br
760 \fIcreds\fP the credentials to verify 
761 .br
762 \fIclient\fP the client name to match up 
763 .br
764 \fIccache\fP the credential cache to use 
765 .br
766 \fIservice\fP a service name to use, used with \fBkrb5_sname_to_principal()\fP to build a hostname to use to verify. 
767 .RE
768 .PP
769
770 .SS "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_is_config_principal (krb5_context context, krb5_const_principal principal)"
771 .PP
772 Return TRUE (non zero) if the principal is a configuration principal (generated part of \fBkrb5_cc_set_config()\fP). Returns FALSE (zero) if not a configuration principal.
773 .PP
774 \fBParameters:\fP
775 .RS 4
776 \fIcontext\fP a Keberos context 
777 .br
778 \fIprincipal\fP principal to check if it a configuration principal 
779 .RE
780 .PP
781
782 .SH "Variable Documentation"
783 .PP 
784 .SS "KRB5_LIB_VARIABLE const krb5_cc_ops \fBkrb5_acc_ops\fP"
785 .PP
786 \fBInitial value:\fP
787 .PP
788 .nf
789  {
790     KRB5_CC_OPS_VERSION,
791     'API',
792     acc_get_name,
793     acc_resolve,
794     acc_gen_new,
795     acc_initialize,
796     acc_destroy,
797     acc_close,
798     acc_store_cred,
799     NULL, 
800     acc_get_principal,
801     acc_get_first,
802     acc_get_next,
803     acc_end_get,
804     acc_remove_cred,
805     acc_set_flags,
806     acc_get_version,
807     acc_get_cache_first,
808     acc_get_cache_next,
809     acc_end_cache_get,
810     acc_move,
811     acc_get_default_name,
812     acc_set_default,
813     acc_lastchange,
814     NULL,
815     NULL,
816 }
817 .fi
818 Variable containing the API based credential cache implemention. 
819 .SS "KRB5_LIB_VARIABLE const krb5_cc_ops \fBkrb5_fcc_ops\fP"
820 .PP
821 \fBInitial value:\fP
822 .PP
823 .nf
824  {
825     KRB5_CC_OPS_VERSION,
826     'FILE',
827     fcc_get_name,
828     fcc_resolve,
829     fcc_gen_new,
830     fcc_initialize,
831     fcc_destroy,
832     fcc_close,
833     fcc_store_cred,
834     NULL, 
835     fcc_get_principal,
836     fcc_get_first,
837     fcc_get_next,
838     fcc_end_get,
839     fcc_remove_cred,
840     fcc_set_flags,
841     fcc_get_version,
842     fcc_get_cache_first,
843     fcc_get_cache_next,
844     fcc_end_cache_get,
845     fcc_move,
846     fcc_get_default_name,
847     NULL,
848     fcc_lastchange,
849     fcc_set_kdc_offset,
850     fcc_get_kdc_offset
851 }
852 .fi
853 Variable containing the FILE based credential cache implemention. 
854 .SS "KRB5_LIB_VARIABLE const krb5_cc_ops \fBkrb5_mcc_ops\fP"
855 .PP
856 \fBInitial value:\fP
857 .PP
858 .nf
859  {
860     KRB5_CC_OPS_VERSION,
861     'MEMORY',
862     mcc_get_name,
863     mcc_resolve,
864     mcc_gen_new,
865     mcc_initialize,
866     mcc_destroy,
867     mcc_close,
868     mcc_store_cred,
869     NULL, 
870     mcc_get_principal,
871     mcc_get_first,
872     mcc_get_next,
873     mcc_end_get,
874     mcc_remove_cred,
875     mcc_set_flags,
876     NULL,
877     mcc_get_cache_first,
878     mcc_get_cache_next,
879     mcc_end_cache_get,
880     mcc_move,
881     mcc_default_name,
882     NULL,
883     mcc_lastchange,
884     mcc_set_kdc_offset,
885     mcc_get_kdc_offset
886 }
887 .fi
888 Variable containing the MEMORY based credential cache implemention.