1 .TH "krb5_ccache_intro" 3 "11 Jan 2012" "Version 1.5.2" "HeimdalKerberos5library" \" -*- nroff -*-
5 krb5_ccache_intro \- The credential cache functions
6 .SH "Kerberos credential caches"
8 krb5_ccache structure holds a Kerberos credential cache.
10 Heimdal support the follow types of credential caches:
13 SCC Store the credential in a database
15 FILE Store the credential in memory
17 MEMORY Store the credential in memory
19 API A credential cache server based solution for Mac OS X
21 KCM A credential cache server based solution for all platforms
24 This is a minimalistic version of klist:
30 main (int argc, char **argv)
33 krb5_cc_cursor cursor;
38 if (krb5_init_context (&context) != 0)
39 errx(1, 'krb5_context');
41 ret = krb5_cc_default (context, &id);
43 krb5_err(context, 1, ret, 'krb5_cc_default');
45 ret = krb5_cc_start_seq_get(context, id, &cursor);
47 krb5_err(context, 1, ret, 'krb5_cc_start_seq_get');
49 while((ret = krb5_cc_next_cred(context, id, &cursor, &creds)) == 0){
52 krb5_unparse_name(context, creds.server, &principal);
53 printf('principal: %s\\n', principal);
55 krb5_free_cred_contents (context, &creds);
57 ret = krb5_cc_end_seq_get(context, id, &cursor);
59 krb5_err(context, 1, ret, 'krb5_cc_end_seq_get');
61 krb5_cc_close(context, id);
63 krb5_free_context(context);