1 | /* This is a generated file */ |
2 | #ifndef __hdb_protos_h__ |
3 | #define __hdb_protos_h__ |
4 | #ifndef DOXY |
5 | |
6 | #include <stdarg.h> |
7 | |
8 | #ifdef __cplusplus |
9 | extern "C" { |
10 | #endif |
11 | |
12 | krb5_error_code |
13 | entry2mit_string_int ( |
14 | krb5_context /*context*/, |
15 | krb5_storage */*sp*/, |
16 | hdb_entry */*ent*/); |
17 | |
18 | /** |
19 | * This function adds an HDB entry's current keyset to the entry's key |
20 | * history. The current keyset is left alone; the caller is responsible |
21 | * for freeing it. |
22 | * |
23 | * @param context Context |
24 | * @param entry HDB entry |
25 | */ |
26 | |
27 | krb5_error_code |
28 | hdb_add_current_keys_to_history ( |
29 | krb5_context /*context*/, |
30 | hdb_entry */*entry*/); |
31 | |
32 | /** |
33 | * This function adds a key to an HDB entry's key history. |
34 | * |
35 | * @param context Context |
36 | * @param entry HDB entry |
37 | * @param kvno Key version number of the key to add to the history |
38 | * @param key The Key to add |
39 | */ |
40 | |
41 | krb5_error_code |
42 | hdb_add_history_key ( |
43 | krb5_context /*context*/, |
44 | hdb_entry */*entry*/, |
45 | krb5_kvno /*kvno*/, |
46 | Key */*key*/); |
47 | |
48 | krb5_error_code |
49 | hdb_add_master_key ( |
50 | krb5_context /*context*/, |
51 | krb5_keyblock */*key*/, |
52 | hdb_master_key */*inout*/); |
53 | |
54 | /** |
55 | * This function changes an hdb_entry's kvno, swapping the current key |
56 | * set with a historical keyset. If no historical keys are found then |
57 | * an error is returned (the caller can still set entry->kvno directly). |
58 | * |
59 | * @param context krb5_context |
60 | * @param new_kvno New kvno for the entry |
61 | * @param entry hdb_entry to modify |
62 | */ |
63 | |
64 | krb5_error_code |
65 | hdb_change_kvno ( |
66 | krb5_context /*context*/, |
67 | krb5_kvno /*new_kvno*/, |
68 | hdb_entry */*entry*/); |
69 | |
70 | krb5_error_code |
71 | hdb_check_db_format ( |
72 | krb5_context /*context*/, |
73 | HDB */*db*/); |
74 | |
75 | krb5_error_code |
76 | hdb_clear_extension ( |
77 | krb5_context /*context*/, |
78 | hdb_entry */*entry*/, |
79 | int /*type*/); |
80 | |
81 | krb5_error_code |
82 | hdb_clear_master_key ( |
83 | krb5_context /*context*/, |
84 | HDB */*db*/); |
85 | |
86 | /** |
87 | * Create a handle for a Kerberos database |
88 | * |
89 | * Create a handle for a Kerberos database backend specified by a |
90 | * filename. Doesn't create a file if its doesn't exists, you have to |
91 | * use O_CREAT to tell the backend to create the file. |
92 | */ |
93 | |
94 | krb5_error_code |
95 | hdb_create ( |
96 | krb5_context /*context*/, |
97 | HDB **/*db*/, |
98 | const char */*filename*/); |
99 | |
100 | krb5_error_code |
101 | hdb_db1_create ( |
102 | krb5_context /*context*/, |
103 | HDB **/*db*/, |
104 | const char */*filename*/); |
105 | |
106 | krb5_error_code |
107 | hdb_db3_create ( |
108 | krb5_context /*context*/, |
109 | HDB **/*db*/, |
110 | const char */*filename*/); |
111 | |
112 | /** |
113 | * Return the directory where the hdb database resides. |
114 | * |
115 | * @param context Kerberos 5 context. |
116 | * |
117 | * @return string pointing to directory. |
118 | */ |
119 | |
120 | const char * |
121 | hdb_db_dir (krb5_context /*context*/); |
122 | |
123 | const char * |
124 | hdb_dbinfo_get_acl_file ( |
125 | krb5_context /*context*/, |
126 | struct hdb_dbinfo */*dbp*/); |
127 | |
128 | const krb5_config_binding * |
129 | hdb_dbinfo_get_binding ( |
130 | krb5_context /*context*/, |
131 | struct hdb_dbinfo */*dbp*/); |
132 | |
133 | const char * |
134 | hdb_dbinfo_get_dbname ( |
135 | krb5_context /*context*/, |
136 | struct hdb_dbinfo */*dbp*/); |
137 | |
138 | const char * |
139 | hdb_dbinfo_get_label ( |
140 | krb5_context /*context*/, |
141 | struct hdb_dbinfo */*dbp*/); |
142 | |
143 | const char * |
144 | hdb_dbinfo_get_log_file ( |
145 | krb5_context /*context*/, |
146 | struct hdb_dbinfo */*dbp*/); |
147 | |
148 | const char * |
149 | hdb_dbinfo_get_mkey_file ( |
150 | krb5_context /*context*/, |
151 | struct hdb_dbinfo */*dbp*/); |
152 | |
153 | struct hdb_dbinfo * |
154 | hdb_dbinfo_get_next ( |
155 | struct hdb_dbinfo */*dbp*/, |
156 | struct hdb_dbinfo */*dbprevp*/); |
157 | |
158 | const char * |
159 | hdb_dbinfo_get_realm ( |
160 | krb5_context /*context*/, |
161 | struct hdb_dbinfo */*dbp*/); |
162 | |
163 | /** |
164 | * Return the default hdb database resides. |
165 | * |
166 | * @param context Kerberos 5 context. |
167 | * |
168 | * @return string pointing to directory. |
169 | */ |
170 | |
171 | const char * |
172 | hdb_default_db (krb5_context /*context*/); |
173 | |
174 | krb5_error_code |
175 | hdb_enctype2key ( |
176 | krb5_context /*context*/, |
177 | hdb_entry */*e*/, |
178 | const Keys */*keyset*/, |
179 | krb5_enctype /*enctype*/, |
180 | Key **/*key*/); |
181 | |
182 | krb5_error_code |
183 | hdb_entry2string ( |
184 | krb5_context /*context*/, |
185 | hdb_entry */*ent*/, |
186 | char **/*str*/); |
187 | |
188 | int |
189 | hdb_entry2value ( |
190 | krb5_context /*context*/, |
191 | const hdb_entry */*ent*/, |
192 | krb5_data */*value*/); |
193 | |
194 | int |
195 | hdb_entry_alias2value ( |
196 | krb5_context /*context*/, |
197 | const hdb_entry_alias */*alias*/, |
198 | krb5_data */*value*/); |
199 | |
200 | krb5_error_code |
201 | hdb_entry_check_mandatory ( |
202 | krb5_context /*context*/, |
203 | const hdb_entry */*ent*/); |
204 | |
205 | krb5_error_code |
206 | hdb_entry_clear_kvno_diff_clnt ( |
207 | krb5_context /*context*/, |
208 | hdb_entry */*entry*/); |
209 | |
210 | krb5_error_code |
211 | hdb_entry_clear_kvno_diff_svc ( |
212 | krb5_context /*context*/, |
213 | hdb_entry */*entry*/); |
214 | |
215 | int |
216 | hdb_entry_clear_password ( |
217 | krb5_context /*context*/, |
218 | hdb_entry */*entry*/); |
219 | |
220 | krb5_error_code |
221 | hdb_entry_get_ConstrainedDelegACL ( |
222 | const hdb_entry */*entry*/, |
223 | const HDB_Ext_Constrained_delegation_acl **/*a*/); |
224 | |
225 | krb5_error_code |
226 | hdb_entry_get_aliases ( |
227 | const hdb_entry */*entry*/, |
228 | const HDB_Ext_Aliases **/*a*/); |
229 | |
230 | unsigned int |
231 | hdb_entry_get_kvno_diff_clnt (const hdb_entry */*entry*/); |
232 | |
233 | unsigned int |
234 | hdb_entry_get_kvno_diff_svc (const hdb_entry */*entry*/); |
235 | |
236 | int |
237 | hdb_entry_get_password ( |
238 | krb5_context /*context*/, |
239 | HDB */*db*/, |
240 | const hdb_entry */*entry*/, |
241 | char **/*p*/); |
242 | |
243 | krb5_error_code |
244 | hdb_entry_get_pkinit_acl ( |
245 | const hdb_entry */*entry*/, |
246 | const HDB_Ext_PKINIT_acl **/*a*/); |
247 | |
248 | krb5_error_code |
249 | hdb_entry_get_pkinit_cert ( |
250 | const hdb_entry */*entry*/, |
251 | const HDB_Ext_PKINIT_cert **/*a*/); |
252 | |
253 | krb5_error_code |
254 | hdb_entry_get_pkinit_hash ( |
255 | const hdb_entry */*entry*/, |
256 | const HDB_Ext_PKINIT_hash **/*a*/); |
257 | |
258 | krb5_error_code |
259 | hdb_entry_get_pw_change_time ( |
260 | const hdb_entry */*entry*/, |
261 | time_t */*t*/); |
262 | |
263 | krb5_error_code |
264 | hdb_entry_set_kvno_diff_clnt ( |
265 | krb5_context /*context*/, |
266 | hdb_entry */*entry*/, |
267 | unsigned int /*diff*/); |
268 | |
269 | krb5_error_code |
270 | hdb_entry_set_kvno_diff_svc ( |
271 | krb5_context /*context*/, |
272 | hdb_entry */*entry*/, |
273 | unsigned int /*diff*/); |
274 | |
275 | int |
276 | hdb_entry_set_password ( |
277 | krb5_context /*context*/, |
278 | HDB */*db*/, |
279 | hdb_entry */*entry*/, |
280 | const char */*p*/); |
281 | |
282 | krb5_error_code |
283 | hdb_entry_set_pw_change_time ( |
284 | krb5_context /*context*/, |
285 | hdb_entry */*entry*/, |
286 | time_t /*t*/); |
287 | |
288 | HDB_extension * |
289 | hdb_find_extension ( |
290 | const hdb_entry */*entry*/, |
291 | int /*type*/); |
292 | |
293 | krb5_error_code |
294 | hdb_foreach ( |
295 | krb5_context /*context*/, |
296 | HDB */*db*/, |
297 | unsigned /*flags*/, |
298 | hdb_foreach_func_t /*func*/, |
299 | void */*data*/); |
300 | |
301 | void |
302 | hdb_free_dbinfo ( |
303 | krb5_context /*context*/, |
304 | struct hdb_dbinfo **/*dbp*/); |
305 | |
306 | void |
307 | hdb_free_entry ( |
308 | krb5_context /*context*/, |
309 | hdb_entry_ex */*ent*/); |
310 | |
311 | void |
312 | hdb_free_key (Key */*key*/); |
313 | |
314 | void |
315 | hdb_free_keys ( |
316 | krb5_context /*context*/, |
317 | int /*len*/, |
318 | Key */*keys*/); |
319 | |
320 | void |
321 | hdb_free_master_key ( |
322 | krb5_context /*context*/, |
323 | hdb_master_key /*mkey*/); |
324 | |
325 | krb5_error_code |
326 | hdb_generate_key_set ( |
327 | krb5_context /*context*/, |
328 | krb5_principal /*principal*/, |
329 | krb5_key_salt_tuple */*ks_tuple*/, |
330 | int /*n_ks_tuple*/, |
331 | Key **/*ret_key_set*/, |
332 | size_t */*nkeyset*/, |
333 | int /*no_salt*/); |
334 | |
335 | krb5_error_code |
336 | hdb_generate_key_set_password ( |
337 | krb5_context /*context*/, |
338 | krb5_principal /*principal*/, |
339 | const char */*password*/, |
340 | krb5_key_salt_tuple */*ks_tuple*/, |
341 | int /*n_ks_tuple*/, |
342 | Key **/*keys*/, |
343 | size_t */*num_keys*/); |
344 | |
345 | int |
346 | hdb_get_dbinfo ( |
347 | krb5_context /*context*/, |
348 | struct hdb_dbinfo **/*dbp*/); |
349 | |
350 | krb5_error_code |
351 | hdb_init_db ( |
352 | krb5_context /*context*/, |
353 | HDB */*db*/); |
354 | |
355 | int |
356 | hdb_key2principal ( |
357 | krb5_context /*context*/, |
358 | krb5_data */*key*/, |
359 | krb5_principal /*p*/); |
360 | |
361 | krb5_error_code |
362 | hdb_keytab_create ( |
363 | krb5_context /*context*/, |
364 | HDB ** /*db*/, |
365 | const char */*arg*/); |
366 | |
367 | const Keys * |
368 | hdb_kvno2keys ( |
369 | krb5_context /*context*/, |
370 | const hdb_entry */*e*/, |
371 | krb5_kvno /*kvno*/); |
372 | |
373 | krb5_error_code |
374 | hdb_ldap_create ( |
375 | krb5_context /*context*/, |
376 | HDB ** /*db*/, |
377 | const char */*arg*/); |
378 | |
379 | krb5_error_code |
380 | hdb_ldapi_create ( |
381 | krb5_context /*context*/, |
382 | HDB ** /*db*/, |
383 | const char */*arg*/); |
384 | |
385 | krb5_error_code |
386 | hdb_list_builtin ( |
387 | krb5_context /*context*/, |
388 | char **/*list*/); |
389 | |
390 | krb5_error_code |
391 | hdb_lock ( |
392 | int /*fd*/, |
393 | int /*operation*/); |
394 | |
395 | krb5_error_code |
396 | hdb_mdb_create ( |
397 | krb5_context /*context*/, |
398 | HDB **/*db*/, |
399 | const char */*filename*/); |
400 | |
401 | krb5_error_code |
402 | hdb_mitdb_create ( |
403 | krb5_context /*context*/, |
404 | HDB **/*db*/, |
405 | const char */*filename*/); |
406 | |
407 | krb5_error_code |
408 | hdb_ndbm_create ( |
409 | krb5_context /*context*/, |
410 | HDB **/*db*/, |
411 | const char */*filename*/); |
412 | |
413 | krb5_error_code |
414 | hdb_next_enctype2key ( |
415 | krb5_context /*context*/, |
416 | const hdb_entry */*e*/, |
417 | const Keys */*keyset*/, |
418 | krb5_enctype /*enctype*/, |
419 | Key **/*key*/); |
420 | |
421 | int |
422 | hdb_principal2key ( |
423 | krb5_context /*context*/, |
424 | krb5_const_principal /*p*/, |
425 | krb5_data */*key*/); |
426 | |
427 | krb5_error_code |
428 | hdb_print_entry ( |
429 | krb5_context /*context*/, |
430 | HDB */*db*/, |
431 | hdb_entry_ex */*entry*/, |
432 | void */*data*/); |
433 | |
434 | krb5_error_code |
435 | hdb_process_master_key ( |
436 | krb5_context /*context*/, |
437 | int /*kvno*/, |
438 | krb5_keyblock */*key*/, |
439 | krb5_enctype /*etype*/, |
440 | hdb_master_key */*mkey*/); |
441 | |
442 | /** |
443 | * This function prunes an HDB entry's keys that are too old to have been used |
444 | * to mint still valid tickets (based on the entry's maximum ticket lifetime). |
445 | * |
446 | * @param context Context |
447 | * @param entry HDB entry |
448 | */ |
449 | |
450 | krb5_error_code |
451 | hdb_prune_keys ( |
452 | krb5_context /*context*/, |
453 | hdb_entry */*entry*/); |
454 | |
455 | krb5_error_code |
456 | hdb_read_master_key ( |
457 | krb5_context /*context*/, |
458 | const char */*filename*/, |
459 | hdb_master_key */*mkey*/); |
460 | |
461 | krb5_error_code |
462 | hdb_replace_extension ( |
463 | krb5_context /*context*/, |
464 | hdb_entry */*entry*/, |
465 | const HDB_extension */*ext*/); |
466 | |
467 | krb5_error_code |
468 | hdb_seal_key ( |
469 | krb5_context /*context*/, |
470 | HDB */*db*/, |
471 | Key */*k*/); |
472 | |
473 | krb5_error_code |
474 | hdb_seal_key_mkey ( |
475 | krb5_context /*context*/, |
476 | Key */*k*/, |
477 | hdb_master_key /*mkey*/); |
478 | |
479 | krb5_error_code |
480 | hdb_seal_keys ( |
481 | krb5_context /*context*/, |
482 | HDB */*db*/, |
483 | hdb_entry */*ent*/); |
484 | |
485 | krb5_error_code |
486 | hdb_seal_keys_mkey ( |
487 | krb5_context /*context*/, |
488 | hdb_entry */*ent*/, |
489 | hdb_master_key /*mkey*/); |
490 | |
491 | krb5_error_code |
492 | hdb_set_last_modified_by ( |
493 | krb5_context /*context*/, |
494 | hdb_entry */*entry*/, |
495 | krb5_principal /*modby*/, |
496 | time_t /*modtime*/); |
497 | |
498 | krb5_error_code |
499 | hdb_set_master_key ( |
500 | krb5_context /*context*/, |
501 | HDB */*db*/, |
502 | krb5_keyblock */*key*/); |
503 | |
504 | krb5_error_code |
505 | hdb_set_master_keyfile ( |
506 | krb5_context /*context*/, |
507 | HDB */*db*/, |
508 | const char */*keyfile*/); |
509 | |
510 | /** |
511 | * Create SQLITE object, and creates the on disk database if its doesn't exists. |
512 | * |
513 | * @param context A Kerberos 5 context. |
514 | * @param db a returned database handle. |
515 | * @param filename filename |
516 | * |
517 | * @return 0 on success, an error code if not |
518 | */ |
519 | |
520 | krb5_error_code |
521 | hdb_sqlite_create ( |
522 | krb5_context /*context*/, |
523 | HDB **/*db*/, |
524 | const char */*filename*/); |
525 | |
526 | krb5_error_code |
527 | hdb_unlock (int /*fd*/); |
528 | |
529 | krb5_error_code |
530 | hdb_unseal_key ( |
531 | krb5_context /*context*/, |
532 | HDB */*db*/, |
533 | Key */*k*/); |
534 | |
535 | krb5_error_code |
536 | hdb_unseal_key_mkey ( |
537 | krb5_context /*context*/, |
538 | Key */*k*/, |
539 | hdb_master_key /*mkey*/); |
540 | |
541 | krb5_error_code |
542 | hdb_unseal_keys ( |
543 | krb5_context /*context*/, |
544 | HDB */*db*/, |
545 | hdb_entry */*ent*/); |
546 | |
547 | krb5_error_code |
548 | hdb_unseal_keys_kvno ( |
549 | krb5_context /*context*/, |
550 | HDB */*db*/, |
551 | krb5_kvno /*kvno*/, |
552 | unsigned /*flags*/, |
553 | hdb_entry */*ent*/); |
554 | |
555 | krb5_error_code |
556 | hdb_unseal_keys_mkey ( |
557 | krb5_context /*context*/, |
558 | hdb_entry */*ent*/, |
559 | hdb_master_key /*mkey*/); |
560 | |
561 | int |
562 | hdb_value2entry ( |
563 | krb5_context /*context*/, |
564 | krb5_data */*value*/, |
565 | hdb_entry */*ent*/); |
566 | |
567 | int |
568 | hdb_value2entry_alias ( |
569 | krb5_context /*context*/, |
570 | krb5_data */*value*/, |
571 | hdb_entry_alias */*ent*/); |
572 | |
573 | krb5_error_code |
574 | hdb_write_master_key ( |
575 | krb5_context /*context*/, |
576 | const char */*filename*/, |
577 | hdb_master_key /*mkey*/); |
578 | |
579 | #ifdef __cplusplus |
580 | } |
581 | #endif |
582 | |
583 | #endif /* DOXY */ |
584 | #endif /* __hdb_protos_h__ */ |
585 | |