2 * Copyright (c) 2003 - 2007 Kungliga Tekniska Högskolan
3 * (Royal Institute of Technology, Stockholm, Sweden).
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
17 * 3. Neither the name of KTH nor the names of its contributors may be
18 * used to endorse or promote products derived from this software without
19 * specific prior written permission.
21 * THIS SOFTWARE IS PROVIDED BY KTH AND ITS CONTRIBUTORS ``AS IS'' AND ANY
22 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
24 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KTH OR ITS CONTRIBUTORS BE
25 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
28 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
29 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
30 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
31 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
33 #include "krb5_locl.h"
37 static int debug_flag
= 0;
38 static int version_flag
= 0;
39 static int help_flag
= 0;
41 #ifdef KRB5_USE_PATH_TOKENS
42 #define TEST_CC_NAME "%{TEMP}/krb5-cc-test-foo"
44 #define TEST_CC_NAME "/tmp/krb5-cc-test-foo"
48 test_default_name(krb5_context context
)
51 const char *p
, *test_cc_name
= TEST_CC_NAME
;
54 p
= krb5_cc_default_name(context
);
56 krb5_errx (context
, 1, "krb5_cc_default_name 1 failed");
59 ret
= krb5_cc_set_default_name(context
, NULL
);
61 krb5_errx (context
, 1, "krb5_cc_set_default_name failed");
63 p
= krb5_cc_default_name(context
);
65 krb5_errx (context
, 1, "krb5_cc_default_name 2 failed");
68 if (strcmp(p1
, p2
) != 0)
69 krb5_errx (context
, 1, "krb5_cc_default_name no longer same");
71 ret
= krb5_cc_set_default_name(context
, test_cc_name
);
73 krb5_errx (context
, 1, "krb5_cc_set_default_name 1 failed");
75 p
= krb5_cc_default_name(context
);
77 krb5_errx (context
, 1, "krb5_cc_default_name 2 failed");
80 #ifndef KRB5_USE_PATH_TOKENS
81 /* If we are using path tokens, we don't expect the p3 and
82 test_cc_name to match since p3 is going to have expanded
84 if (strcmp(p3
, test_cc_name
) != 0)
85 krb5_errx (context
, 1, "krb5_cc_set_default_name 1 failed");
94 * Check that a closed cc still keeps it data and that it's no longer
95 * there when it's destroyed.
99 test_mcache(krb5_context context
)
105 krb5_principal p
, p2
;
107 ret
= krb5_parse_name(context
, "lha@SU.SE", &p
);
109 krb5_err(context
, 1, ret
, "krb5_parse_name");
111 ret
= krb5_cc_new_unique(context
, krb5_cc_type_memory
, NULL
, &id
);
113 krb5_err(context
, 1, ret
, "krb5_cc_new_unique");
115 ret
= krb5_cc_initialize(context
, id
, p
);
117 krb5_err(context
, 1, ret
, "krb5_cc_initialize");
119 nc
= krb5_cc_get_name(context
, id
);
121 krb5_errx(context
, 1, "krb5_cc_get_name");
123 tc
= krb5_cc_get_type(context
, id
);
125 krb5_errx(context
, 1, "krb5_cc_get_name");
127 if (asprintf(&c
, "%s:%s", tc
, nc
) < 0 || c
== NULL
)
130 krb5_cc_close(context
, id
);
132 ret
= krb5_cc_resolve(context
, c
, &id2
);
134 krb5_err(context
, 1, ret
, "krb5_cc_resolve");
136 ret
= krb5_cc_get_principal(context
, id2
, &p2
);
138 krb5_err(context
, 1, ret
, "krb5_cc_get_principal");
140 if (krb5_principal_compare(context
, p
, p2
) == FALSE
)
141 krb5_errx(context
, 1, "p != p2");
143 krb5_cc_destroy(context
, id2
);
144 krb5_free_principal(context
, p
);
145 krb5_free_principal(context
, p2
);
147 ret
= krb5_cc_resolve(context
, c
, &id2
);
149 krb5_err(context
, 1, ret
, "krb5_cc_resolve");
151 ret
= krb5_cc_get_principal(context
, id2
, &p2
);
153 krb5_errx(context
, 1, "krb5_cc_get_principal");
155 krb5_cc_destroy(context
, id2
);
160 * Test that init works on a destroyed cc.
164 test_init_vs_destroy(krb5_context context
, const char *type
)
168 krb5_principal p
, p2
;
171 ret
= krb5_parse_name(context
, "lha@SU.SE", &p
);
173 krb5_err(context
, 1, ret
, "krb5_parse_name");
175 ret
= krb5_cc_new_unique(context
, type
, NULL
, &id
);
177 krb5_err(context
, 1, ret
, "krb5_cc_new_unique: %s", type
);
179 if (asprintf(&n
, "%s:%s",
180 krb5_cc_get_type(context
, id
),
181 krb5_cc_get_name(context
, id
)) < 0 || n
== NULL
)
185 ret
= krb5_cc_resolve(context
, n
, &id2
);
188 krb5_err(context
, 1, ret
, "krb5_cc_resolve");
190 krb5_cc_destroy(context
, id
);
192 ret
= krb5_cc_initialize(context
, id2
, p
);
194 krb5_err(context
, 1, ret
, "krb5_cc_initialize");
196 ret
= krb5_cc_get_principal(context
, id2
, &p2
);
198 krb5_err(context
, 1, ret
, "krb5_cc_get_principal");
200 krb5_cc_destroy(context
, id2
);
201 krb5_free_principal(context
, p
);
202 krb5_free_principal(context
, p2
);
206 test_cache_remove(krb5_context context
, const char *type
)
213 ret
= krb5_parse_name(context
, "lha@SU.SE", &p
);
215 krb5_err(context
, 1, ret
, "krb5_parse_name");
217 ret
= krb5_cc_new_unique(context
, type
, NULL
, &id
);
219 krb5_err(context
, 1, ret
, "krb5_cc_gen_new: %s", type
);
221 ret
= krb5_cc_initialize(context
, id
, p
);
223 krb5_err(context
, 1, ret
, "krb5_cc_initialize");
226 memset(&cred
, 0, sizeof(cred
));
227 ret
= krb5_parse_name(context
, "krbtgt/SU.SE@SU.SE", &cred
.server
);
229 krb5_err(context
, 1, ret
, "krb5_parse_name");
230 ret
= krb5_parse_name(context
, "lha@SU.SE", &cred
.client
);
232 krb5_err(context
, 1, ret
, "krb5_parse_name");
234 ret
= krb5_cc_store_cred(context
, id
, &cred
);
236 krb5_err(context
, 1, ret
, "krb5_cc_store_cred");
238 ret
= krb5_cc_remove_cred(context
, id
, 0, &cred
);
240 krb5_err(context
, 1, ret
, "krb5_cc_remove_cred");
242 ret
= krb5_cc_destroy(context
, id
);
244 krb5_err(context
, 1, ret
, "krb5_cc_destroy");
246 krb5_free_principal(context
, p
);
247 krb5_free_principal(context
, cred
.server
);
248 krb5_free_principal(context
, cred
.client
);
252 test_mcc_default(void)
254 krb5_context context
;
259 for (i
= 0; i
< 10; i
++) {
261 ret
= krb5_init_context(&context
);
263 krb5_err(context
, 1, ret
, "krb5_init_context");
265 ret
= krb5_cc_set_default_name(context
, "MEMORY:foo");
267 krb5_err(context
, 1, ret
, "krb5_cc_set_default_name");
269 ret
= krb5_cc_default(context
, &id
);
271 krb5_err(context
, 1, ret
, "krb5_cc_default");
273 ret
= krb5_cc_default(context
, &id2
);
275 krb5_err(context
, 1, ret
, "krb5_cc_default");
277 ret
= krb5_cc_close(context
, id
);
279 krb5_err(context
, 1, ret
, "krb5_cc_close");
281 ret
= krb5_cc_close(context
, id2
);
283 krb5_err(context
, 1, ret
, "krb5_cc_close");
285 krb5_free_context(context
);
295 { "foo%}", 0, "foo%}" },
296 { "%{uid}", 0, NULL
},
297 { "foo%{null}", 0, "foo" },
298 { "foo%{null}bar", 0, "foobar" },
300 { "%{foo %{", 1, NULL
},
303 { "%{nulll}", 1, NULL
},
304 { "%{does not exist}", 1, NULL
},
306 #ifdef KRB5_USE_PATH_TOKENS
307 { "%{APPDATA}", 0, NULL
},
308 { "%{COMMON_APPDATA}", 0, NULL
},
309 { "%{LOCAL_APPDATA}", 0, NULL
},
310 { "%{SYSTEM}", 0, NULL
},
311 { "%{WINDOWS}", 0, NULL
},
312 { "%{TEMP}", 0, NULL
},
313 { "%{USERID}", 0, NULL
},
314 { "%{uid}", 0, NULL
},
315 { "%{USERCONFIG}", 0, NULL
},
316 { "%{COMMONCONFIG}", 0, NULL
},
317 { "%{LIBDIR}", 0, NULL
},
318 { "%{BINDIR}", 0, NULL
},
319 { "%{LIBEXEC}", 0, NULL
},
320 { "%{SBINDIR}", 0, NULL
},
325 test_def_cc_name(krb5_context context
)
331 for (i
= 0; i
< sizeof(cc_names
)/sizeof(cc_names
[0]); i
++) {
332 ret
= _krb5_expand_default_cc_name(context
, cc_names
[i
].str
, &str
);
334 if (cc_names
[i
].fail
== 0)
335 krb5_errx(context
, 1, "test %d \"%s\" failed",
338 if (cc_names
[i
].fail
)
339 krb5_errx(context
, 1, "test %d \"%s\" was successful",
341 if (cc_names
[i
].res
&& strcmp(cc_names
[i
].res
, str
) != 0)
342 krb5_errx(context
, 1, "test %d %s != %s",
343 i
, cc_names
[i
].res
, str
);
345 printf("%s => %s\n", cc_names
[i
].str
, str
);
352 test_cache_find(krb5_context context
, const char *principal
, int find
)
354 krb5_principal client
;
356 krb5_ccache id
= NULL
;
358 ret
= krb5_parse_name(context
, principal
, &client
);
360 krb5_err(context
, 1, ret
, "parse_name for %s failed", principal
);
362 ret
= krb5_cc_cache_match(context
, client
, &id
);
364 krb5_err(context
, 1, ret
, "cc_cache_match for %s failed", principal
);
365 if (ret
== 0 && !find
)
366 krb5_err(context
, 1, ret
, "cc_cache_match for %s found", principal
);
369 krb5_cc_close(context
, id
);
370 krb5_free_principal(context
, client
);
375 test_cache_iter(krb5_context context
, const char *type
, int destroy
)
377 krb5_cc_cache_cursor cursor
;
381 ret
= krb5_cc_cache_get_first (context
, type
, &cursor
);
382 if (ret
== KRB5_CC_NOSUPP
)
385 krb5_err(context
, 1, ret
, "krb5_cc_cache_get_first(%s)", type
);
388 while ((ret
= krb5_cc_cache_next (context
, cursor
, &id
)) == 0) {
389 krb5_principal principal
;
393 printf("name: %s\n", krb5_cc_get_name(context
, id
));
394 ret
= krb5_cc_get_principal(context
, id
, &principal
);
396 ret
= krb5_unparse_name(context
, principal
, &name
);
399 printf("\tprincipal: %s\n", name
);
402 krb5_free_principal(context
, principal
);
405 krb5_cc_destroy(context
, id
);
407 krb5_cc_close(context
, id
);
410 krb5_cc_cache_end_seq_get(context
, cursor
);
414 test_cache_iter_all(krb5_context context
)
416 krb5_cccol_cursor cursor
;
420 ret
= krb5_cccol_cursor_new (context
, &cursor
);
422 krb5_err(context
, 1, ret
, "krb5_cccol_cursor_new");
425 while ((ret
= krb5_cccol_cursor_next (context
, cursor
, &id
)) == 0 && id
!= NULL
) {
426 krb5_principal principal
;
430 printf("name: %s\n", krb5_cc_get_name(context
, id
));
431 ret
= krb5_cc_get_principal(context
, id
, &principal
);
433 ret
= krb5_unparse_name(context
, principal
, &name
);
436 printf("\tprincipal: %s\n", name
);
439 krb5_free_principal(context
, principal
);
441 krb5_cc_close(context
, id
);
444 krb5_cccol_cursor_free(context
, &cursor
);
449 test_copy(krb5_context context
, const char *from
, const char *to
)
451 krb5_ccache fromid
, toid
;
453 krb5_principal p
, p2
;
455 ret
= krb5_parse_name(context
, "lha@SU.SE", &p
);
457 krb5_err(context
, 1, ret
, "krb5_parse_name");
459 ret
= krb5_cc_new_unique(context
, from
, NULL
, &fromid
);
461 krb5_err(context
, 1, ret
, "krb5_cc_new_unique: %s", from
);
463 ret
= krb5_cc_initialize(context
, fromid
, p
);
465 krb5_err(context
, 1, ret
, "krb5_cc_initialize");
467 ret
= krb5_cc_new_unique(context
, to
, NULL
, &toid
);
469 krb5_err(context
, 1, ret
, "krb5_cc_gen_new: %s", to
);
471 ret
= krb5_cc_copy_cache(context
, fromid
, toid
);
473 krb5_err(context
, 1, ret
, "krb5_cc_copy_cache");
475 ret
= krb5_cc_get_principal(context
, toid
, &p2
);
477 krb5_err(context
, 1, ret
, "krb5_cc_get_principal");
479 if (krb5_principal_compare(context
, p
, p2
) == FALSE
)
480 krb5_errx(context
, 1, "p != p2");
482 krb5_free_principal(context
, p
);
483 krb5_free_principal(context
, p2
);
485 krb5_cc_destroy(context
, fromid
);
486 krb5_cc_destroy(context
, toid
);
490 test_move(krb5_context context
, const char *type
)
492 const krb5_cc_ops
*ops
;
493 krb5_ccache fromid
, toid
;
495 krb5_principal p
, p2
;
497 ops
= krb5_cc_get_prefix_ops(context
, type
);
501 ret
= krb5_cc_new_unique(context
, type
, NULL
, &fromid
);
502 if (ret
== KRB5_CC_NOSUPP
)
505 krb5_err(context
, 1, ret
, "krb5_cc_new_unique: %s", type
);
507 ret
= krb5_parse_name(context
, "lha@SU.SE", &p
);
509 krb5_err(context
, 1, ret
, "krb5_parse_name");
511 ret
= krb5_cc_initialize(context
, fromid
, p
);
513 krb5_err(context
, 1, ret
, "krb5_cc_initialize");
515 ret
= krb5_cc_new_unique(context
, type
, NULL
, &toid
);
517 krb5_err(context
, 1, ret
, "krb5_cc_new_unique");
519 ret
= krb5_cc_initialize(context
, toid
, p
);
521 krb5_err(context
, 1, ret
, "krb5_cc_initialize");
523 ret
= krb5_cc_get_principal(context
, toid
, &p2
);
525 krb5_err(context
, 1, ret
, "krb5_cc_get_principal");
527 if (krb5_principal_compare(context
, p
, p2
) == FALSE
)
528 krb5_errx(context
, 1, "p != p2");
530 krb5_free_principal(context
, p
);
531 krb5_free_principal(context
, p2
);
533 krb5_cc_destroy(context
, toid
);
534 krb5_cc_destroy(context
, fromid
);
539 test_prefix_ops(krb5_context context
, const char *name
, const krb5_cc_ops
*ops
)
541 const krb5_cc_ops
*o
;
543 o
= krb5_cc_get_prefix_ops(context
, name
);
545 krb5_errx(context
, 1, "found no match for prefix '%s'", name
);
546 if (strcmp(o
->prefix
, ops
->prefix
) != 0)
547 krb5_errx(context
, 1, "ops for prefix '%s' is not "
548 "the expected %s != %s", name
, o
->prefix
, ops
->prefix
);
552 test_cc_config(krb5_context context
, const char *cc_type
,
553 const char *cc_name
, size_t count
)
560 ret
= krb5_cc_new_unique(context
, cc_type
, cc_name
, &id
);
562 krb5_err(context
, 1, ret
, "krb5_cc_new_unique");
564 ret
= krb5_parse_name(context
, "lha@SU.SE", &p
);
566 krb5_err(context
, 1, ret
, "krb5_parse_name");
568 ret
= krb5_cc_initialize(context
, id
, p
);
570 krb5_err(context
, 1, ret
, "krb5_cc_initialize");
572 for (i
= 0; i
< count
; i
++) {
573 krb5_data data
, data2
;
574 const char *name
= "foo";
575 krb5_principal p1
= NULL
;
580 data
.data
= rk_UNCONST(name
);
581 data
.length
= strlen(name
);
584 * Because of how krb5_cc_set_config() this will also test
585 * krb5_cc_remove_cred().
587 ret
= krb5_cc_set_config(context
, id
, p1
, "FriendlyName", &data
);
589 krb5_errx(context
, 1, "krb5_cc_set_config: add");
591 ret
= krb5_cc_get_config(context
, id
, p1
, "FriendlyName", &data2
);
593 krb5_errx(context
, 1, "krb5_cc_get_config: first");
595 if (data
.length
!= data2
.length
||
596 memcmp(data
.data
, data2
.data
, data
.length
) != 0)
597 krb5_errx(context
, 1, "krb5_cc_get_config: did not fetch what was set");
599 krb5_data_free(&data2
);
601 data
.data
= rk_UNCONST("bar");
602 data
.length
= strlen("bar");
604 ret
= krb5_cc_set_config(context
, id
, p1
, "FriendlyName", &data
);
606 krb5_errx(context
, 1, "krb5_cc_set_config: add -second");
608 ret
= krb5_cc_get_config(context
, id
, p1
, "FriendlyName", &data2
);
610 krb5_errx(context
, 1, "krb5_cc_get_config: second");
612 if (data
.length
!= data2
.length
||
613 memcmp(data
.data
, data2
.data
, data
.length
) != 0)
614 krb5_errx(context
, 1, "krb5_cc_get_config: replace failed");
616 krb5_data_free(&data2
);
618 ret
= krb5_cc_set_config(context
, id
, p1
, "FriendlyName", NULL
);
620 krb5_errx(context
, 1, "krb5_cc_set_config: delete");
622 ret
= krb5_cc_get_config(context
, id
, p1
, "FriendlyName", &data2
);
624 krb5_errx(context
, 1, "krb5_cc_get_config: non-existant");
627 krb5_errx(context
, 1, "krb5_cc_get_config: delete failed");
630 krb5_cc_destroy(context
, id
);
631 krb5_free_principal(context
, p
);
635 static struct getargs args
[] = {
636 {"debug", 'd', arg_flag
, &debug_flag
,
637 "turn on debuggin", NULL
},
638 {"version", 0, arg_flag
, &version_flag
,
639 "print version", NULL
},
640 {"help", 0, arg_flag
, &help_flag
,
647 arg_printusage (args
, sizeof(args
)/sizeof(*args
), NULL
, "hostname ...");
652 main(int argc
, char **argv
)
654 krb5_context context
;
657 krb5_ccache id1
, id2
;
659 setprogname(argv
[0]);
661 if(getarg(args
, sizeof(args
) / sizeof(args
[0]), argc
, argv
, &optidx
))
675 ret
= krb5_init_context(&context
);
677 errx (1, "krb5_init_context failed: %d", ret
);
679 test_cache_remove(context
, krb5_cc_type_file
);
680 test_cache_remove(context
, krb5_cc_type_memory
);
682 test_cache_remove(context
, krb5_cc_type_scc
);
685 test_default_name(context
);
686 test_mcache(context
);
687 test_init_vs_destroy(context
, krb5_cc_type_memory
);
688 test_init_vs_destroy(context
, krb5_cc_type_file
);
690 test_init_vs_destroy(context
, krb5_cc_type_api
);
692 test_init_vs_destroy(context
, krb5_cc_type_scc
);
693 test_init_vs_destroy(context
, krb5_cc_type_dcc
);
695 test_def_cc_name(context
);
697 test_cache_iter_all(context
);
699 test_cache_iter(context
, krb5_cc_type_memory
, 0);
702 krb5_cc_new_unique(context
, krb5_cc_type_memory
, "bar", &id1
);
703 krb5_cc_new_unique(context
, krb5_cc_type_memory
, "baz", &id2
);
704 krb5_parse_name(context
, "lha@SU.SE", &p
);
705 krb5_cc_initialize(context
, id1
, p
);
706 krb5_free_principal(context
, p
);
709 test_cache_find(context
, "lha@SU.SE", 1);
710 test_cache_find(context
, "hulabundulahotentot@SU.SE", 0);
712 test_cache_iter(context
, krb5_cc_type_memory
, 0);
713 test_cache_iter(context
, krb5_cc_type_memory
, 1);
714 test_cache_iter(context
, krb5_cc_type_memory
, 0);
715 test_cache_iter(context
, krb5_cc_type_file
, 0);
716 test_cache_iter(context
, krb5_cc_type_api
, 0);
717 test_cache_iter(context
, krb5_cc_type_scc
, 0);
718 test_cache_iter(context
, krb5_cc_type_scc
, 1);
720 test_cache_iter(context
, krb5_cc_type_dcc
, 0);
721 test_cache_iter(context
, krb5_cc_type_dcc
, 1);
724 test_copy(context
, krb5_cc_type_file
, krb5_cc_type_file
);
725 test_copy(context
, krb5_cc_type_memory
, krb5_cc_type_memory
);
726 test_copy(context
, krb5_cc_type_file
, krb5_cc_type_memory
);
727 test_copy(context
, krb5_cc_type_memory
, krb5_cc_type_file
);
728 test_copy(context
, krb5_cc_type_scc
, krb5_cc_type_file
);
729 test_copy(context
, krb5_cc_type_file
, krb5_cc_type_scc
);
730 test_copy(context
, krb5_cc_type_scc
, krb5_cc_type_memory
);
731 test_copy(context
, krb5_cc_type_memory
, krb5_cc_type_scc
);
733 test_copy(context
, krb5_cc_type_dcc
, krb5_cc_type_memory
);
734 test_copy(context
, krb5_cc_type_dcc
, krb5_cc_type_file
);
735 test_copy(context
, krb5_cc_type_dcc
, krb5_cc_type_scc
);
738 test_move(context
, krb5_cc_type_file
);
739 test_move(context
, krb5_cc_type_memory
);
741 test_move(context
, krb5_cc_type_kcm
);
743 test_move(context
, krb5_cc_type_scc
);
745 test_move(context
, krb5_cc_type_dcc
);
748 test_prefix_ops(context
, "FILE:/tmp/foo", &krb5_fcc_ops
);
749 test_prefix_ops(context
, "FILE", &krb5_fcc_ops
);
750 test_prefix_ops(context
, "MEMORY", &krb5_mcc_ops
);
751 test_prefix_ops(context
, "MEMORY:foo", &krb5_mcc_ops
);
752 test_prefix_ops(context
, "/tmp/kaka", &krb5_fcc_ops
);
754 test_prefix_ops(context
, "SCC:", &krb5_scc_ops
);
755 test_prefix_ops(context
, "SCC:foo", &krb5_scc_ops
);
758 test_prefix_ops(context
, "DIR:", &krb5_dcc_ops
);
759 test_prefix_ops(context
, "DIR:tkt1", &krb5_dcc_ops
);
762 krb5_cc_destroy(context
, id1
);
763 krb5_cc_destroy(context
, id2
);
765 test_cc_config(context
, "MEMORY", "bar", 1000); /* 1000 because fast */
766 test_cc_config(context
, "FILE", "/tmp/foocc", 30); /* 30 because slower */
768 krb5_free_context(context
);