Allow users to specify their own configuration file ~/.krb5/config
[heimdal.git] / lib / krb5 / keytab_file.c
blob9a21db0cbb297dfc6fe7325ed531cf7b5545cd5b
1 /*
2 * Copyright (c) 1997 - 2008 Kungliga Tekniska Högskolan
3 * (Royal Institute of Technology, Stockholm, Sweden).
4 * All rights reserved.
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
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 the Institute nor the names of its contributors
18 * may be used to endorse or promote products derived from this software
19 * without specific prior written permission.
21 * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
34 #include "krb5_locl.h"
36 #define KRB5_KT_VNO_1 1
37 #define KRB5_KT_VNO_2 2
38 #define KRB5_KT_VNO KRB5_KT_VNO_2
40 #define KRB5_KT_FL_JAVA 1
43 /* file operations -------------------------------------------- */
45 struct fkt_data {
46 char *filename;
47 int flags;
50 static krb5_error_code
51 krb5_kt_ret_data(krb5_context context,
52 krb5_storage *sp,
53 krb5_data *data)
55 int ret;
56 int16_t size;
57 ret = krb5_ret_int16(sp, &size);
58 if(ret)
59 return ret;
60 data->length = size;
61 data->data = malloc(size);
62 if (data->data == NULL) {
63 krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", ""));
64 return ENOMEM;
66 ret = krb5_storage_read(sp, data->data, size);
67 if(ret != size)
68 return (ret < 0)? errno : KRB5_KT_END;
69 return 0;
72 static krb5_error_code
73 krb5_kt_ret_string(krb5_context context,
74 krb5_storage *sp,
75 heim_general_string *data)
77 int ret;
78 int16_t size;
79 ret = krb5_ret_int16(sp, &size);
80 if(ret)
81 return ret;
82 *data = malloc(size + 1);
83 if (*data == NULL) {
84 krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", ""));
85 return ENOMEM;
87 ret = krb5_storage_read(sp, *data, size);
88 (*data)[size] = '\0';
89 if(ret != size)
90 return (ret < 0)? errno : KRB5_KT_END;
91 return 0;
94 static krb5_error_code
95 krb5_kt_store_data(krb5_context context,
96 krb5_storage *sp,
97 krb5_data data)
99 int ret;
100 ret = krb5_store_int16(sp, data.length);
101 if(ret < 0)
102 return ret;
103 ret = krb5_storage_write(sp, data.data, data.length);
104 if(ret != data.length){
105 if(ret < 0)
106 return errno;
107 return KRB5_KT_END;
109 return 0;
112 static krb5_error_code
113 krb5_kt_store_string(krb5_storage *sp,
114 heim_general_string data)
116 int ret;
117 size_t len = strlen(data);
118 ret = krb5_store_int16(sp, len);
119 if(ret < 0)
120 return ret;
121 ret = krb5_storage_write(sp, data, len);
122 if(ret != len){
123 if(ret < 0)
124 return errno;
125 return KRB5_KT_END;
127 return 0;
130 static krb5_error_code
131 krb5_kt_ret_keyblock(krb5_context context,
132 struct fkt_data *fkt,
133 krb5_storage *sp,
134 krb5_keyblock *p)
136 int ret;
137 int16_t tmp;
139 ret = krb5_ret_int16(sp, &tmp); /* keytype + etype */
140 if(ret) {
141 krb5_set_error_message(context, ret,
142 N_("Cant read keyblock from file %s", ""),
143 fkt->filename);
144 return ret;
146 p->keytype = tmp;
147 ret = krb5_kt_ret_data(context, sp, &p->keyvalue);
148 if (ret)
149 krb5_set_error_message(context, ret,
150 N_("Cant read keyblock from file %s", ""),
151 fkt->filename);
152 return ret;
155 static krb5_error_code
156 krb5_kt_store_keyblock(krb5_context context,
157 struct fkt_data *fkt,
158 krb5_storage *sp,
159 krb5_keyblock *p)
161 int ret;
163 ret = krb5_store_int16(sp, p->keytype); /* keytype + etype */
164 if(ret) {
165 krb5_set_error_message(context, ret,
166 N_("Cant store keyblock to file %s", ""),
167 fkt->filename);
168 return ret;
170 ret = krb5_kt_store_data(context, sp, p->keyvalue);
171 if (ret)
172 krb5_set_error_message(context, ret,
173 N_("Cant store keyblock to file %s", ""),
174 fkt->filename);
175 return ret;
179 static krb5_error_code
180 krb5_kt_ret_principal(krb5_context context,
181 struct fkt_data *fkt,
182 krb5_storage *sp,
183 krb5_principal *princ)
185 int i;
186 int ret;
187 krb5_principal p;
188 int16_t len;
190 ALLOC(p, 1);
191 if(p == NULL) {
192 krb5_set_error_message(context, ENOMEM,
193 N_("malloc: out of memory", ""));
194 return ENOMEM;
197 ret = krb5_ret_int16(sp, &len);
198 if(ret) {
199 krb5_set_error_message(context, ret,
200 N_("Failed decoding length of "
201 "keytab principal in keytab file %s", ""),
202 fkt->filename);
203 goto out;
205 if(krb5_storage_is_flags(sp, KRB5_STORAGE_PRINCIPAL_WRONG_NUM_COMPONENTS))
206 len--;
207 if (len < 0) {
208 ret = KRB5_KT_END;
209 krb5_set_error_message(context, ret,
210 N_("Keytab principal contains "
211 "invalid length in keytab %s", ""),
212 fkt->filename);
213 goto out;
215 ret = krb5_kt_ret_string(context, sp, &p->realm);
216 if(ret) {
217 krb5_set_error_message(context, ret,
218 N_("Can't read realm from keytab: %s", ""),
219 fkt->filename);
220 goto out;
222 p->name.name_string.val = calloc(len, sizeof(*p->name.name_string.val));
223 if(p->name.name_string.val == NULL) {
224 ret = ENOMEM;
225 krb5_set_error_message(context, ret, N_("malloc: out of memory", ""));
226 goto out;
228 p->name.name_string.len = len;
229 for(i = 0; i < p->name.name_string.len; i++){
230 ret = krb5_kt_ret_string(context, sp, p->name.name_string.val + i);
231 if(ret) {
232 krb5_set_error_message(context, ret,
233 N_("Can't read principal from "
234 "keytab: %s", ""),
235 fkt->filename);
236 goto out;
239 if (krb5_storage_is_flags(sp, KRB5_STORAGE_PRINCIPAL_NO_NAME_TYPE))
240 p->name.name_type = KRB5_NT_UNKNOWN;
241 else {
242 int32_t tmp32;
243 ret = krb5_ret_int32(sp, &tmp32);
244 p->name.name_type = tmp32;
245 if (ret) {
246 krb5_set_error_message(context, ret,
247 N_("Can't read name-type from "
248 "keytab: %s", ""),
249 fkt->filename);
250 goto out;
253 *princ = p;
254 return 0;
255 out:
256 krb5_free_principal(context, p);
257 return ret;
260 static krb5_error_code
261 krb5_kt_store_principal(krb5_context context,
262 krb5_storage *sp,
263 krb5_principal p)
265 int i;
266 int ret;
268 if(krb5_storage_is_flags(sp, KRB5_STORAGE_PRINCIPAL_WRONG_NUM_COMPONENTS))
269 ret = krb5_store_int16(sp, p->name.name_string.len + 1);
270 else
271 ret = krb5_store_int16(sp, p->name.name_string.len);
272 if(ret) return ret;
273 ret = krb5_kt_store_string(sp, p->realm);
274 if(ret) return ret;
275 for(i = 0; i < p->name.name_string.len; i++){
276 ret = krb5_kt_store_string(sp, p->name.name_string.val[i]);
277 if(ret)
278 return ret;
280 if(!krb5_storage_is_flags(sp, KRB5_STORAGE_PRINCIPAL_NO_NAME_TYPE)) {
281 ret = krb5_store_int32(sp, p->name.name_type);
282 if(ret)
283 return ret;
286 return 0;
289 static krb5_error_code
290 fkt_resolve(krb5_context context, const char *name, krb5_keytab id)
292 struct fkt_data *d;
294 d = malloc(sizeof(*d));
295 if(d == NULL) {
296 krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", ""));
297 return ENOMEM;
299 d->filename = strdup(name);
300 if(d->filename == NULL) {
301 free(d);
302 krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", ""));
303 return ENOMEM;
305 d->flags = 0;
306 id->data = d;
307 return 0;
310 static krb5_error_code
311 fkt_resolve_java14(krb5_context context, const char *name, krb5_keytab id)
313 krb5_error_code ret;
315 ret = fkt_resolve(context, name, id);
316 if (ret == 0) {
317 struct fkt_data *d = id->data;
318 d->flags |= KRB5_KT_FL_JAVA;
320 return ret;
323 static krb5_error_code
324 fkt_close(krb5_context context, krb5_keytab id)
326 struct fkt_data *d = id->data;
327 free(d->filename);
328 free(d);
329 return 0;
332 static krb5_error_code
333 fkt_destroy(krb5_context context, krb5_keytab id)
335 struct fkt_data *d = id->data;
336 _krb5_erase_file(context, d->filename);
337 return 0;
340 static krb5_error_code
341 fkt_get_name(krb5_context context,
342 krb5_keytab id,
343 char *name,
344 size_t namesize)
346 /* This function is XXX */
347 struct fkt_data *d = id->data;
348 strlcpy(name, d->filename, namesize);
349 return 0;
352 static void
353 storage_set_flags(krb5_context context, krb5_storage *sp, int vno)
355 int flags = 0;
356 switch(vno) {
357 case KRB5_KT_VNO_1:
358 flags |= KRB5_STORAGE_PRINCIPAL_WRONG_NUM_COMPONENTS;
359 flags |= KRB5_STORAGE_PRINCIPAL_NO_NAME_TYPE;
360 flags |= KRB5_STORAGE_HOST_BYTEORDER;
361 break;
362 case KRB5_KT_VNO_2:
363 break;
364 default:
365 krb5_warnx(context,
366 "storage_set_flags called with bad vno (%d)", vno);
368 krb5_storage_set_flags(sp, flags);
371 static krb5_error_code
372 fkt_start_seq_get_int(krb5_context context,
373 krb5_keytab id,
374 int flags,
375 int exclusive,
376 krb5_kt_cursor *c)
378 int8_t pvno, tag;
379 krb5_error_code ret;
380 struct fkt_data *d = id->data;
382 c->fd = open (d->filename, flags);
383 if (c->fd < 0) {
384 ret = errno;
385 krb5_set_error_message(context, ret,
386 N_("keytab %s open failed: %s", ""),
387 d->filename, strerror(ret));
388 return ret;
390 rk_cloexec(c->fd);
391 ret = _krb5_xlock(context, c->fd, exclusive, d->filename);
392 if (ret) {
393 close(c->fd);
394 return ret;
396 c->sp = krb5_storage_from_fd(c->fd);
397 if (c->sp == NULL) {
398 _krb5_xunlock(context, c->fd);
399 close(c->fd);
400 krb5_set_error_message(context, ENOMEM,
401 N_("malloc: out of memory", ""));
402 return ENOMEM;
404 krb5_storage_set_eof_code(c->sp, KRB5_KT_END);
405 ret = krb5_ret_int8(c->sp, &pvno);
406 if(ret) {
407 krb5_storage_free(c->sp);
408 _krb5_xunlock(context, c->fd);
409 close(c->fd);
410 krb5_clear_error_message(context);
411 return ret;
413 if(pvno != 5) {
414 krb5_storage_free(c->sp);
415 _krb5_xunlock(context, c->fd);
416 close(c->fd);
417 krb5_clear_error_message (context);
418 return KRB5_KEYTAB_BADVNO;
420 ret = krb5_ret_int8(c->sp, &tag);
421 if (ret) {
422 krb5_storage_free(c->sp);
423 _krb5_xunlock(context, c->fd);
424 close(c->fd);
425 krb5_clear_error_message(context);
426 return ret;
428 id->version = tag;
429 storage_set_flags(context, c->sp, id->version);
430 return 0;
433 static krb5_error_code
434 fkt_start_seq_get(krb5_context context,
435 krb5_keytab id,
436 krb5_kt_cursor *c)
438 return fkt_start_seq_get_int(context, id, O_RDONLY | O_BINARY | O_CLOEXEC, 0, c);
441 static krb5_error_code
442 fkt_next_entry_int(krb5_context context,
443 krb5_keytab id,
444 krb5_keytab_entry *entry,
445 krb5_kt_cursor *cursor,
446 off_t *start,
447 off_t *end)
449 struct fkt_data *d = id->data;
450 int32_t len;
451 int ret;
452 int8_t tmp8;
453 int32_t tmp32;
454 uint32_t utmp32;
455 off_t pos, curpos;
457 pos = krb5_storage_seek(cursor->sp, 0, SEEK_CUR);
458 loop:
459 ret = krb5_ret_int32(cursor->sp, &len);
460 if (ret)
461 return ret;
462 if(len < 0) {
463 pos = krb5_storage_seek(cursor->sp, -len, SEEK_CUR);
464 goto loop;
466 ret = krb5_kt_ret_principal (context, d, cursor->sp, &entry->principal);
467 if (ret)
468 goto out;
469 ret = krb5_ret_uint32(cursor->sp, &utmp32);
470 entry->timestamp = utmp32;
471 if (ret)
472 goto out;
473 ret = krb5_ret_int8(cursor->sp, &tmp8);
474 if (ret)
475 goto out;
476 entry->vno = tmp8;
477 ret = krb5_kt_ret_keyblock (context, d, cursor->sp, &entry->keyblock);
478 if (ret)
479 goto out;
480 /* there might be a 32 bit kvno here
481 * if it's zero, assume that the 8bit one was right,
482 * otherwise trust the new value */
483 curpos = krb5_storage_seek(cursor->sp, 0, SEEK_CUR);
484 if(len + 4 + pos - curpos >= 4) {
485 ret = krb5_ret_int32(cursor->sp, &tmp32);
486 if (ret == 0 && tmp32 != 0)
487 entry->vno = tmp32;
489 /* there might be a flags field here */
490 if(len + 4 + pos - curpos >= 8) {
491 ret = krb5_ret_uint32(cursor->sp, &utmp32);
492 if (ret == 0)
493 entry->flags = utmp32;
494 } else
495 entry->flags = 0;
497 entry->aliases = NULL;
499 if(start) *start = pos;
500 if(end) *end = pos + 4 + len;
501 out:
502 krb5_storage_seek(cursor->sp, pos + 4 + len, SEEK_SET);
503 return ret;
506 static krb5_error_code
507 fkt_next_entry(krb5_context context,
508 krb5_keytab id,
509 krb5_keytab_entry *entry,
510 krb5_kt_cursor *cursor)
512 return fkt_next_entry_int(context, id, entry, cursor, NULL, NULL);
515 static krb5_error_code
516 fkt_end_seq_get(krb5_context context,
517 krb5_keytab id,
518 krb5_kt_cursor *cursor)
520 krb5_storage_free(cursor->sp);
521 _krb5_xunlock(context, cursor->fd);
522 close(cursor->fd);
523 return 0;
526 static krb5_error_code
527 fkt_setup_keytab(krb5_context context,
528 krb5_keytab id,
529 krb5_storage *sp)
531 krb5_error_code ret;
532 ret = krb5_store_int8(sp, 5);
533 if(ret)
534 return ret;
535 if(id->version == 0)
536 id->version = KRB5_KT_VNO;
537 return krb5_store_int8 (sp, id->version);
540 static krb5_error_code
541 fkt_add_entry(krb5_context context,
542 krb5_keytab id,
543 krb5_keytab_entry *entry)
545 int ret;
546 int fd;
547 krb5_storage *sp;
548 struct fkt_data *d = id->data;
549 krb5_data keytab;
550 int32_t len;
552 fd = open (d->filename, O_RDWR | O_BINARY | O_CLOEXEC);
553 if (fd < 0) {
554 fd = open (d->filename, O_RDWR | O_CREAT | O_EXCL | O_BINARY | O_CLOEXEC, 0600);
555 if (fd < 0) {
556 ret = errno;
557 krb5_set_error_message(context, ret,
558 N_("open(%s): %s", ""), d->filename,
559 strerror(ret));
560 return ret;
562 rk_cloexec(fd);
564 ret = _krb5_xlock(context, fd, 1, d->filename);
565 if (ret) {
566 close(fd);
567 return ret;
569 sp = krb5_storage_from_fd(fd);
570 krb5_storage_set_eof_code(sp, KRB5_KT_END);
571 ret = fkt_setup_keytab(context, id, sp);
572 if(ret) {
573 goto out;
575 storage_set_flags(context, sp, id->version);
576 } else {
577 int8_t pvno, tag;
579 rk_cloexec(fd);
581 ret = _krb5_xlock(context, fd, 1, d->filename);
582 if (ret) {
583 close(fd);
584 return ret;
586 sp = krb5_storage_from_fd(fd);
587 krb5_storage_set_eof_code(sp, KRB5_KT_END);
588 ret = krb5_ret_int8(sp, &pvno);
589 if(ret) {
590 /* we probably have a zero byte file, so try to set it up
591 properly */
592 ret = fkt_setup_keytab(context, id, sp);
593 if(ret) {
594 krb5_set_error_message(context, ret,
595 N_("%s: keytab is corrupted: %s", ""),
596 d->filename, strerror(ret));
597 goto out;
599 storage_set_flags(context, sp, id->version);
600 } else {
601 if(pvno != 5) {
602 ret = KRB5_KEYTAB_BADVNO;
603 krb5_set_error_message(context, ret,
604 N_("Bad version in keytab %s", ""),
605 d->filename);
606 goto out;
608 ret = krb5_ret_int8 (sp, &tag);
609 if (ret) {
610 krb5_set_error_message(context, ret,
611 N_("failed reading tag from "
612 "keytab %s", ""),
613 d->filename);
614 goto out;
616 id->version = tag;
617 storage_set_flags(context, sp, id->version);
622 krb5_storage *emem;
623 emem = krb5_storage_emem();
624 if(emem == NULL) {
625 ret = ENOMEM;
626 krb5_set_error_message(context, ret,
627 N_("malloc: out of memory", ""));
628 goto out;
630 ret = krb5_kt_store_principal(context, emem, entry->principal);
631 if(ret) {
632 krb5_set_error_message(context, ret,
633 N_("Failed storing principal "
634 "in keytab %s", ""),
635 d->filename);
636 krb5_storage_free(emem);
637 goto out;
639 ret = krb5_store_int32 (emem, entry->timestamp);
640 if(ret) {
641 krb5_set_error_message(context, ret,
642 N_("Failed storing timpstamp "
643 "in keytab %s", ""),
644 d->filename);
645 krb5_storage_free(emem);
646 goto out;
648 ret = krb5_store_int8 (emem, entry->vno % 256);
649 if(ret) {
650 krb5_set_error_message(context, ret,
651 N_("Failed storing kvno "
652 "in keytab %s", ""),
653 d->filename);
654 krb5_storage_free(emem);
655 goto out;
657 ret = krb5_kt_store_keyblock (context, d, emem, &entry->keyblock);
658 if(ret) {
659 krb5_storage_free(emem);
660 goto out;
662 if ((d->flags & KRB5_KT_FL_JAVA) == 0) {
663 ret = krb5_store_int32 (emem, entry->vno);
664 if (ret) {
665 krb5_set_error_message(context, ret,
666 N_("Failed storing extended kvno "
667 "in keytab %s", ""),
668 d->filename);
669 krb5_storage_free(emem);
670 goto out;
672 ret = krb5_store_uint32 (emem, entry->flags);
673 if (ret) {
674 krb5_set_error_message(context, ret,
675 N_("Failed storing extended kvno "
676 "in keytab %s", ""),
677 d->filename);
678 krb5_storage_free(emem);
679 goto out;
683 ret = krb5_storage_to_data(emem, &keytab);
684 krb5_storage_free(emem);
685 if(ret) {
686 krb5_set_error_message(context, ret,
687 N_("Failed converting keytab entry "
688 "to memory block for keytab %s", ""),
689 d->filename);
690 goto out;
694 while(1) {
695 ret = krb5_ret_int32(sp, &len);
696 if(ret == KRB5_KT_END) {
697 len = keytab.length;
698 break;
700 if(len < 0) {
701 len = -len;
702 if(len >= keytab.length) {
703 krb5_storage_seek(sp, -4, SEEK_CUR);
704 break;
707 krb5_storage_seek(sp, len, SEEK_CUR);
709 ret = krb5_store_int32(sp, len);
710 if(krb5_storage_write(sp, keytab.data, keytab.length) < 0) {
711 ret = errno;
712 krb5_set_error_message(context, ret,
713 N_("Failed writing keytab block "
714 "in keytab %s: %s", ""),
715 d->filename, strerror(ret));
717 memset(keytab.data, 0, keytab.length);
718 krb5_data_free(&keytab);
719 out:
720 krb5_storage_free(sp);
721 _krb5_xunlock(context, fd);
722 close(fd);
723 return ret;
726 static krb5_error_code
727 fkt_remove_entry(krb5_context context,
728 krb5_keytab id,
729 krb5_keytab_entry *entry)
731 krb5_keytab_entry e;
732 krb5_kt_cursor cursor;
733 off_t pos_start, pos_end;
734 int found = 0;
735 krb5_error_code ret;
737 ret = fkt_start_seq_get_int(context, id, O_RDWR | O_BINARY | O_CLOEXEC, 1, &cursor);
738 if(ret != 0)
739 goto out; /* return other error here? */
740 while(fkt_next_entry_int(context, id, &e, &cursor,
741 &pos_start, &pos_end) == 0) {
742 if(krb5_kt_compare(context, &e, entry->principal,
743 entry->vno, entry->keyblock.keytype)) {
744 int32_t len;
745 unsigned char buf[128];
746 found = 1;
747 krb5_storage_seek(cursor.sp, pos_start, SEEK_SET);
748 len = pos_end - pos_start - 4;
749 krb5_store_int32(cursor.sp, -len);
750 memset(buf, 0, sizeof(buf));
751 while(len > 0) {
752 krb5_storage_write(cursor.sp, buf, min(len, sizeof(buf)));
753 len -= min(len, sizeof(buf));
756 krb5_kt_free_entry(context, &e);
758 krb5_kt_end_seq_get(context, id, &cursor);
759 out:
760 if (!found) {
761 krb5_clear_error_message (context);
762 return KRB5_KT_NOTFOUND;
764 return 0;
767 const krb5_kt_ops krb5_fkt_ops = {
768 "FILE",
769 fkt_resolve,
770 fkt_get_name,
771 fkt_close,
772 fkt_destroy,
773 NULL, /* get */
774 fkt_start_seq_get,
775 fkt_next_entry,
776 fkt_end_seq_get,
777 fkt_add_entry,
778 fkt_remove_entry
781 const krb5_kt_ops krb5_wrfkt_ops = {
782 "WRFILE",
783 fkt_resolve,
784 fkt_get_name,
785 fkt_close,
786 fkt_destroy,
787 NULL, /* get */
788 fkt_start_seq_get,
789 fkt_next_entry,
790 fkt_end_seq_get,
791 fkt_add_entry,
792 fkt_remove_entry
795 const krb5_kt_ops krb5_javakt_ops = {
796 "JAVA14",
797 fkt_resolve_java14,
798 fkt_get_name,
799 fkt_close,
800 fkt_destroy,
801 NULL, /* get */
802 fkt_start_seq_get,
803 fkt_next_entry,
804 fkt_end_seq_get,
805 fkt_add_entry,
806 fkt_remove_entry