xref: /netbsd-src/crypto/external/bsd/heimdal/dist/lib/hdb/hdb-protos.h (revision 241bea01a19bbb306af27777a870b86d41cb3fda)
1*241bea01Schristos /*	$NetBSD: hdb-protos.h,v 1.2 2019/12/15 22:50:49 christos Exp $	*/
2929c70cbSchristos 
3929c70cbSchristos /* This is a generated file */
4929c70cbSchristos #ifndef __hdb_protos_h__
5929c70cbSchristos #define __hdb_protos_h__
6929c70cbSchristos #ifndef DOXY
7929c70cbSchristos 
8929c70cbSchristos #include <stdarg.h>
9929c70cbSchristos 
10929c70cbSchristos #ifdef __cplusplus
11929c70cbSchristos extern "C" {
12929c70cbSchristos #endif
13929c70cbSchristos 
14929c70cbSchristos krb5_error_code
15929c70cbSchristos entry2mit_string_int (
16929c70cbSchristos 	krb5_context /*context*/,
17929c70cbSchristos 	krb5_storage */*sp*/,
18929c70cbSchristos 	hdb_entry */*ent*/);
19929c70cbSchristos 
20929c70cbSchristos /**
21929c70cbSchristos  * This function adds an HDB entry's current keyset to the entry's key
22929c70cbSchristos  * history.  The current keyset is left alone; the caller is responsible
23929c70cbSchristos  * for freeing it.
24929c70cbSchristos  *
25929c70cbSchristos  * @param context   Context
26929c70cbSchristos  * @param entry	    HDB entry
27929c70cbSchristos  */
28929c70cbSchristos 
29929c70cbSchristos krb5_error_code
30929c70cbSchristos hdb_add_current_keys_to_history (
31929c70cbSchristos 	krb5_context /*context*/,
32929c70cbSchristos 	hdb_entry */*entry*/);
33929c70cbSchristos 
34929c70cbSchristos /**
35929c70cbSchristos  * This function adds a key to an HDB entry's key history.
36929c70cbSchristos  *
37929c70cbSchristos  * @param context   Context
38929c70cbSchristos  * @param entry	    HDB entry
39929c70cbSchristos  * @param kvno	    Key version number of the key to add to the history
40929c70cbSchristos  * @param key	    The Key to add
41929c70cbSchristos  */
42929c70cbSchristos 
43929c70cbSchristos krb5_error_code
44929c70cbSchristos hdb_add_history_key (
45929c70cbSchristos 	krb5_context /*context*/,
46929c70cbSchristos 	hdb_entry */*entry*/,
47929c70cbSchristos 	krb5_kvno /*kvno*/,
48929c70cbSchristos 	Key */*key*/);
49929c70cbSchristos 
50929c70cbSchristos krb5_error_code
51929c70cbSchristos hdb_add_master_key (
52929c70cbSchristos 	krb5_context /*context*/,
53929c70cbSchristos 	krb5_keyblock */*key*/,
54929c70cbSchristos 	hdb_master_key */*inout*/);
55929c70cbSchristos 
56929c70cbSchristos /**
57929c70cbSchristos  * This function changes an hdb_entry's kvno, swapping the current key
58929c70cbSchristos  * set with a historical keyset.  If no historical keys are found then
59929c70cbSchristos  * an error is returned (the caller can still set entry->kvno directly).
60929c70cbSchristos  *
61929c70cbSchristos  * @param context	krb5_context
62929c70cbSchristos  * @param new_kvno	New kvno for the entry
63929c70cbSchristos  * @param entry		hdb_entry to modify
64929c70cbSchristos  */
65929c70cbSchristos 
66929c70cbSchristos krb5_error_code
67929c70cbSchristos hdb_change_kvno (
68929c70cbSchristos 	krb5_context /*context*/,
69929c70cbSchristos 	krb5_kvno /*new_kvno*/,
70929c70cbSchristos 	hdb_entry */*entry*/);
71929c70cbSchristos 
72929c70cbSchristos krb5_error_code
73929c70cbSchristos hdb_check_db_format (
74929c70cbSchristos 	krb5_context /*context*/,
75929c70cbSchristos 	HDB */*db*/);
76929c70cbSchristos 
77929c70cbSchristos krb5_error_code
78929c70cbSchristos hdb_clear_extension (
79929c70cbSchristos 	krb5_context /*context*/,
80929c70cbSchristos 	hdb_entry */*entry*/,
81929c70cbSchristos 	int /*type*/);
82929c70cbSchristos 
83929c70cbSchristos krb5_error_code
84929c70cbSchristos hdb_clear_master_key (
85929c70cbSchristos 	krb5_context /*context*/,
86929c70cbSchristos 	HDB */*db*/);
87929c70cbSchristos 
88929c70cbSchristos /**
89929c70cbSchristos  * Create a handle for a Kerberos database
90929c70cbSchristos  *
91929c70cbSchristos  * Create a handle for a Kerberos database backend specified by a
92929c70cbSchristos  * filename.  Doesn't create a file if its doesn't exists, you have to
93929c70cbSchristos  * use O_CREAT to tell the backend to create the file.
94929c70cbSchristos  */
95929c70cbSchristos 
96929c70cbSchristos krb5_error_code
97929c70cbSchristos hdb_create (
98929c70cbSchristos 	krb5_context /*context*/,
99929c70cbSchristos 	HDB **/*db*/,
100929c70cbSchristos 	const char */*filename*/);
101929c70cbSchristos 
102929c70cbSchristos krb5_error_code
103929c70cbSchristos hdb_db1_create (
104929c70cbSchristos 	krb5_context /*context*/,
105929c70cbSchristos 	HDB **/*db*/,
106929c70cbSchristos 	const char */*filename*/);
107929c70cbSchristos 
108929c70cbSchristos krb5_error_code
109929c70cbSchristos hdb_db3_create (
110929c70cbSchristos 	krb5_context /*context*/,
111929c70cbSchristos 	HDB **/*db*/,
112929c70cbSchristos 	const char */*filename*/);
113929c70cbSchristos 
114929c70cbSchristos /**
115929c70cbSchristos  * Return the directory where the hdb database resides.
116929c70cbSchristos  *
117929c70cbSchristos  * @param context Kerberos 5 context.
118929c70cbSchristos  *
119929c70cbSchristos  * @return string pointing to directory.
120929c70cbSchristos  */
121929c70cbSchristos 
122929c70cbSchristos const char *
123929c70cbSchristos hdb_db_dir (krb5_context /*context*/);
124929c70cbSchristos 
125929c70cbSchristos const char *
126929c70cbSchristos hdb_dbinfo_get_acl_file (
127929c70cbSchristos 	krb5_context /*context*/,
128929c70cbSchristos 	struct hdb_dbinfo */*dbp*/);
129929c70cbSchristos 
130929c70cbSchristos const krb5_config_binding *
131929c70cbSchristos hdb_dbinfo_get_binding (
132929c70cbSchristos 	krb5_context /*context*/,
133929c70cbSchristos 	struct hdb_dbinfo */*dbp*/);
134929c70cbSchristos 
135929c70cbSchristos const char *
136929c70cbSchristos hdb_dbinfo_get_dbname (
137929c70cbSchristos 	krb5_context /*context*/,
138929c70cbSchristos 	struct hdb_dbinfo */*dbp*/);
139929c70cbSchristos 
140929c70cbSchristos const char *
141929c70cbSchristos hdb_dbinfo_get_label (
142929c70cbSchristos 	krb5_context /*context*/,
143929c70cbSchristos 	struct hdb_dbinfo */*dbp*/);
144929c70cbSchristos 
145929c70cbSchristos const char *
146929c70cbSchristos hdb_dbinfo_get_log_file (
147929c70cbSchristos 	krb5_context /*context*/,
148929c70cbSchristos 	struct hdb_dbinfo */*dbp*/);
149929c70cbSchristos 
150929c70cbSchristos const char *
151929c70cbSchristos hdb_dbinfo_get_mkey_file (
152929c70cbSchristos 	krb5_context /*context*/,
153929c70cbSchristos 	struct hdb_dbinfo */*dbp*/);
154929c70cbSchristos 
155929c70cbSchristos struct hdb_dbinfo *
156929c70cbSchristos hdb_dbinfo_get_next (
157929c70cbSchristos 	struct hdb_dbinfo */*dbp*/,
158929c70cbSchristos 	struct hdb_dbinfo */*dbprevp*/);
159929c70cbSchristos 
160929c70cbSchristos const char *
161929c70cbSchristos hdb_dbinfo_get_realm (
162929c70cbSchristos 	krb5_context /*context*/,
163929c70cbSchristos 	struct hdb_dbinfo */*dbp*/);
164929c70cbSchristos 
165929c70cbSchristos /**
166929c70cbSchristos  * Return the default hdb database resides.
167929c70cbSchristos  *
168929c70cbSchristos  * @param context Kerberos 5 context.
169929c70cbSchristos  *
170929c70cbSchristos  * @return string pointing to directory.
171929c70cbSchristos  */
172929c70cbSchristos 
173929c70cbSchristos const char *
174929c70cbSchristos hdb_default_db (krb5_context /*context*/);
175929c70cbSchristos 
176929c70cbSchristos krb5_error_code
177929c70cbSchristos hdb_enctype2key (
178929c70cbSchristos 	krb5_context /*context*/,
179929c70cbSchristos 	hdb_entry */*e*/,
180929c70cbSchristos 	const Keys */*keyset*/,
181929c70cbSchristos 	krb5_enctype /*enctype*/,
182929c70cbSchristos 	Key **/*key*/);
183929c70cbSchristos 
184929c70cbSchristos krb5_error_code
185929c70cbSchristos hdb_entry2string (
186929c70cbSchristos 	krb5_context /*context*/,
187929c70cbSchristos 	hdb_entry */*ent*/,
188929c70cbSchristos 	char **/*str*/);
189929c70cbSchristos 
190929c70cbSchristos int
191929c70cbSchristos hdb_entry2value (
192929c70cbSchristos 	krb5_context /*context*/,
193929c70cbSchristos 	const hdb_entry */*ent*/,
194929c70cbSchristos 	krb5_data */*value*/);
195929c70cbSchristos 
196929c70cbSchristos int
197929c70cbSchristos hdb_entry_alias2value (
198929c70cbSchristos 	krb5_context /*context*/,
199929c70cbSchristos 	const hdb_entry_alias */*alias*/,
200929c70cbSchristos 	krb5_data */*value*/);
201929c70cbSchristos 
202929c70cbSchristos krb5_error_code
203929c70cbSchristos hdb_entry_check_mandatory (
204929c70cbSchristos 	krb5_context /*context*/,
205929c70cbSchristos 	const hdb_entry */*ent*/);
206929c70cbSchristos 
207929c70cbSchristos krb5_error_code
208929c70cbSchristos hdb_entry_clear_kvno_diff_clnt (
209929c70cbSchristos 	krb5_context /*context*/,
210929c70cbSchristos 	hdb_entry */*entry*/);
211929c70cbSchristos 
212929c70cbSchristos krb5_error_code
213929c70cbSchristos hdb_entry_clear_kvno_diff_svc (
214929c70cbSchristos 	krb5_context /*context*/,
215929c70cbSchristos 	hdb_entry */*entry*/);
216929c70cbSchristos 
217929c70cbSchristos int
218929c70cbSchristos hdb_entry_clear_password (
219929c70cbSchristos 	krb5_context /*context*/,
220929c70cbSchristos 	hdb_entry */*entry*/);
221929c70cbSchristos 
222929c70cbSchristos krb5_error_code
223929c70cbSchristos hdb_entry_get_ConstrainedDelegACL (
224929c70cbSchristos 	const hdb_entry */*entry*/,
225929c70cbSchristos 	const HDB_Ext_Constrained_delegation_acl **/*a*/);
226929c70cbSchristos 
227929c70cbSchristos krb5_error_code
228929c70cbSchristos hdb_entry_get_aliases (
229929c70cbSchristos 	const hdb_entry */*entry*/,
230929c70cbSchristos 	const HDB_Ext_Aliases **/*a*/);
231929c70cbSchristos 
232929c70cbSchristos unsigned int
233929c70cbSchristos hdb_entry_get_kvno_diff_clnt (const hdb_entry */*entry*/);
234929c70cbSchristos 
235929c70cbSchristos unsigned int
236929c70cbSchristos hdb_entry_get_kvno_diff_svc (const hdb_entry */*entry*/);
237929c70cbSchristos 
238929c70cbSchristos int
239929c70cbSchristos hdb_entry_get_password (
240929c70cbSchristos 	krb5_context /*context*/,
241929c70cbSchristos 	HDB */*db*/,
242929c70cbSchristos 	const hdb_entry */*entry*/,
243929c70cbSchristos 	char **/*p*/);
244929c70cbSchristos 
245929c70cbSchristos krb5_error_code
246929c70cbSchristos hdb_entry_get_pkinit_acl (
247929c70cbSchristos 	const hdb_entry */*entry*/,
248929c70cbSchristos 	const HDB_Ext_PKINIT_acl **/*a*/);
249929c70cbSchristos 
250929c70cbSchristos krb5_error_code
251929c70cbSchristos hdb_entry_get_pkinit_cert (
252929c70cbSchristos 	const hdb_entry */*entry*/,
253929c70cbSchristos 	const HDB_Ext_PKINIT_cert **/*a*/);
254929c70cbSchristos 
255929c70cbSchristos krb5_error_code
256929c70cbSchristos hdb_entry_get_pkinit_hash (
257929c70cbSchristos 	const hdb_entry */*entry*/,
258929c70cbSchristos 	const HDB_Ext_PKINIT_hash **/*a*/);
259929c70cbSchristos 
260929c70cbSchristos krb5_error_code
261929c70cbSchristos hdb_entry_get_pw_change_time (
262929c70cbSchristos 	const hdb_entry */*entry*/,
263929c70cbSchristos 	time_t */*t*/);
264929c70cbSchristos 
265929c70cbSchristos krb5_error_code
266929c70cbSchristos hdb_entry_set_kvno_diff_clnt (
267929c70cbSchristos 	krb5_context /*context*/,
268929c70cbSchristos 	hdb_entry */*entry*/,
269929c70cbSchristos 	unsigned int /*diff*/);
270929c70cbSchristos 
271929c70cbSchristos krb5_error_code
272929c70cbSchristos hdb_entry_set_kvno_diff_svc (
273929c70cbSchristos 	krb5_context /*context*/,
274929c70cbSchristos 	hdb_entry */*entry*/,
275929c70cbSchristos 	unsigned int /*diff*/);
276929c70cbSchristos 
277929c70cbSchristos int
278929c70cbSchristos hdb_entry_set_password (
279929c70cbSchristos 	krb5_context /*context*/,
280929c70cbSchristos 	HDB */*db*/,
281929c70cbSchristos 	hdb_entry */*entry*/,
282929c70cbSchristos 	const char */*p*/);
283929c70cbSchristos 
284929c70cbSchristos krb5_error_code
285929c70cbSchristos hdb_entry_set_pw_change_time (
286929c70cbSchristos 	krb5_context /*context*/,
287929c70cbSchristos 	hdb_entry */*entry*/,
288929c70cbSchristos 	time_t /*t*/);
289929c70cbSchristos 
290929c70cbSchristos HDB_extension *
291929c70cbSchristos hdb_find_extension (
292929c70cbSchristos 	const hdb_entry */*entry*/,
293929c70cbSchristos 	int /*type*/);
294929c70cbSchristos 
295929c70cbSchristos krb5_error_code
296929c70cbSchristos hdb_foreach (
297929c70cbSchristos 	krb5_context /*context*/,
298929c70cbSchristos 	HDB */*db*/,
299929c70cbSchristos 	unsigned /*flags*/,
300929c70cbSchristos 	hdb_foreach_func_t /*func*/,
301929c70cbSchristos 	void */*data*/);
302929c70cbSchristos 
303929c70cbSchristos void
304929c70cbSchristos hdb_free_dbinfo (
305929c70cbSchristos 	krb5_context /*context*/,
306929c70cbSchristos 	struct hdb_dbinfo **/*dbp*/);
307929c70cbSchristos 
308929c70cbSchristos void
309929c70cbSchristos hdb_free_entry (
310929c70cbSchristos 	krb5_context /*context*/,
311929c70cbSchristos 	hdb_entry_ex */*ent*/);
312929c70cbSchristos 
313929c70cbSchristos void
314929c70cbSchristos hdb_free_key (Key */*key*/);
315929c70cbSchristos 
316929c70cbSchristos void
317929c70cbSchristos hdb_free_keys (
318929c70cbSchristos 	krb5_context /*context*/,
319929c70cbSchristos 	int /*len*/,
320929c70cbSchristos 	Key */*keys*/);
321929c70cbSchristos 
322929c70cbSchristos void
323929c70cbSchristos hdb_free_master_key (
324929c70cbSchristos 	krb5_context /*context*/,
325929c70cbSchristos 	hdb_master_key /*mkey*/);
326929c70cbSchristos 
327929c70cbSchristos krb5_error_code
328929c70cbSchristos hdb_generate_key_set (
329929c70cbSchristos 	krb5_context /*context*/,
330929c70cbSchristos 	krb5_principal /*principal*/,
331929c70cbSchristos 	krb5_key_salt_tuple */*ks_tuple*/,
332929c70cbSchristos 	int /*n_ks_tuple*/,
333929c70cbSchristos 	Key **/*ret_key_set*/,
334929c70cbSchristos 	size_t */*nkeyset*/,
335929c70cbSchristos 	int /*no_salt*/);
336929c70cbSchristos 
337929c70cbSchristos krb5_error_code
338929c70cbSchristos hdb_generate_key_set_password (
339929c70cbSchristos 	krb5_context /*context*/,
340929c70cbSchristos 	krb5_principal /*principal*/,
341929c70cbSchristos 	const char */*password*/,
342929c70cbSchristos 	Key **/*keys*/,
343929c70cbSchristos 	size_t */*num_keys*/);
344929c70cbSchristos 
345929c70cbSchristos krb5_error_code
346929c70cbSchristos hdb_generate_key_set_password_with_ks_tuple (
347929c70cbSchristos 	krb5_context /*context*/,
348929c70cbSchristos 	krb5_principal /*principal*/,
349929c70cbSchristos 	const char */*password*/,
350929c70cbSchristos 	krb5_key_salt_tuple */*ks_tuple*/,
351929c70cbSchristos 	int /*n_ks_tuple*/,
352929c70cbSchristos 	Key **/*keys*/,
353929c70cbSchristos 	size_t */*num_keys*/);
354929c70cbSchristos 
355929c70cbSchristos int
356929c70cbSchristos hdb_get_dbinfo (
357929c70cbSchristos 	krb5_context /*context*/,
358929c70cbSchristos 	struct hdb_dbinfo **/*dbp*/);
359929c70cbSchristos 
360929c70cbSchristos krb5_error_code
361929c70cbSchristos hdb_init_db (
362929c70cbSchristos 	krb5_context /*context*/,
363929c70cbSchristos 	HDB */*db*/);
364929c70cbSchristos 
365929c70cbSchristos int
366929c70cbSchristos hdb_key2principal (
367929c70cbSchristos 	krb5_context /*context*/,
368929c70cbSchristos 	krb5_data */*key*/,
369929c70cbSchristos 	krb5_principal /*p*/);
370929c70cbSchristos 
371929c70cbSchristos krb5_error_code
372929c70cbSchristos hdb_keytab_create (
373929c70cbSchristos 	krb5_context /*context*/,
374929c70cbSchristos 	HDB ** /*db*/,
375929c70cbSchristos 	const char */*arg*/);
376929c70cbSchristos 
377929c70cbSchristos const Keys *
378929c70cbSchristos hdb_kvno2keys (
379929c70cbSchristos 	krb5_context /*context*/,
380929c70cbSchristos 	const hdb_entry */*e*/,
381929c70cbSchristos 	krb5_kvno /*kvno*/);
382929c70cbSchristos 
383929c70cbSchristos krb5_error_code
384929c70cbSchristos hdb_ldap_create (
385929c70cbSchristos 	krb5_context /*context*/,
386929c70cbSchristos 	HDB ** /*db*/,
387929c70cbSchristos 	const char */*arg*/);
388929c70cbSchristos 
389929c70cbSchristos krb5_error_code
390929c70cbSchristos hdb_ldapi_create (
391929c70cbSchristos 	krb5_context /*context*/,
392929c70cbSchristos 	HDB ** /*db*/,
393929c70cbSchristos 	const char */*arg*/);
394929c70cbSchristos 
395929c70cbSchristos krb5_error_code
396929c70cbSchristos hdb_list_builtin (
397929c70cbSchristos 	krb5_context /*context*/,
398929c70cbSchristos 	char **/*list*/);
399929c70cbSchristos 
400929c70cbSchristos krb5_error_code
401929c70cbSchristos hdb_lock (
402929c70cbSchristos 	int /*fd*/,
403929c70cbSchristos 	int /*operation*/);
404929c70cbSchristos 
405929c70cbSchristos krb5_error_code
406929c70cbSchristos hdb_mdb_create (
407929c70cbSchristos 	krb5_context /*context*/,
408929c70cbSchristos 	HDB **/*db*/,
409929c70cbSchristos 	const char */*filename*/);
410929c70cbSchristos 
411929c70cbSchristos krb5_error_code
412929c70cbSchristos hdb_mitdb_create (
413929c70cbSchristos 	krb5_context /*context*/,
414929c70cbSchristos 	HDB **/*db*/,
415929c70cbSchristos 	const char */*filename*/);
416929c70cbSchristos 
417929c70cbSchristos krb5_error_code
418929c70cbSchristos hdb_ndbm_create (
419929c70cbSchristos 	krb5_context /*context*/,
420929c70cbSchristos 	HDB **/*db*/,
421929c70cbSchristos 	const char */*filename*/);
422929c70cbSchristos 
423929c70cbSchristos krb5_error_code
424929c70cbSchristos hdb_next_enctype2key (
425929c70cbSchristos 	krb5_context /*context*/,
426929c70cbSchristos 	const hdb_entry */*e*/,
427929c70cbSchristos 	const Keys */*keyset*/,
428929c70cbSchristos 	krb5_enctype /*enctype*/,
429929c70cbSchristos 	Key **/*key*/);
430929c70cbSchristos 
431929c70cbSchristos int
432929c70cbSchristos hdb_principal2key (
433929c70cbSchristos 	krb5_context /*context*/,
434929c70cbSchristos 	krb5_const_principal /*p*/,
435929c70cbSchristos 	krb5_data */*key*/);
436929c70cbSchristos 
437929c70cbSchristos krb5_error_code
438929c70cbSchristos hdb_print_entry (
439929c70cbSchristos 	krb5_context /*context*/,
440929c70cbSchristos 	HDB */*db*/,
441929c70cbSchristos 	hdb_entry_ex */*entry*/,
442929c70cbSchristos 	void */*data*/);
443929c70cbSchristos 
444929c70cbSchristos krb5_error_code
445929c70cbSchristos hdb_process_master_key (
446929c70cbSchristos 	krb5_context /*context*/,
447929c70cbSchristos 	int /*kvno*/,
448929c70cbSchristos 	krb5_keyblock */*key*/,
449929c70cbSchristos 	krb5_enctype /*etype*/,
450929c70cbSchristos 	hdb_master_key */*mkey*/);
451929c70cbSchristos 
452929c70cbSchristos /**
453929c70cbSchristos  * This function prunes an HDB entry's keys that are too old to have been used
454929c70cbSchristos  * to mint still valid tickets (based on the entry's maximum ticket lifetime).
455929c70cbSchristos  *
456929c70cbSchristos  * @param context   Context
457929c70cbSchristos  * @param entry	    HDB entry
458929c70cbSchristos  */
459929c70cbSchristos 
460929c70cbSchristos krb5_error_code
461929c70cbSchristos hdb_prune_keys (
462929c70cbSchristos 	krb5_context /*context*/,
463929c70cbSchristos 	hdb_entry */*entry*/);
464929c70cbSchristos 
465929c70cbSchristos krb5_error_code
466929c70cbSchristos hdb_read_master_key (
467929c70cbSchristos 	krb5_context /*context*/,
468929c70cbSchristos 	const char */*filename*/,
469929c70cbSchristos 	hdb_master_key */*mkey*/);
470929c70cbSchristos 
471929c70cbSchristos krb5_error_code
472929c70cbSchristos hdb_replace_extension (
473929c70cbSchristos 	krb5_context /*context*/,
474929c70cbSchristos 	hdb_entry */*entry*/,
475929c70cbSchristos 	const HDB_extension */*ext*/);
476929c70cbSchristos 
477929c70cbSchristos krb5_error_code
478929c70cbSchristos hdb_seal_key (
479929c70cbSchristos 	krb5_context /*context*/,
480929c70cbSchristos 	HDB */*db*/,
481929c70cbSchristos 	Key */*k*/);
482929c70cbSchristos 
483929c70cbSchristos krb5_error_code
484929c70cbSchristos hdb_seal_key_mkey (
485929c70cbSchristos 	krb5_context /*context*/,
486929c70cbSchristos 	Key */*k*/,
487929c70cbSchristos 	hdb_master_key /*mkey*/);
488929c70cbSchristos 
489929c70cbSchristos krb5_error_code
490929c70cbSchristos hdb_seal_keys (
491929c70cbSchristos 	krb5_context /*context*/,
492929c70cbSchristos 	HDB */*db*/,
493929c70cbSchristos 	hdb_entry */*ent*/);
494929c70cbSchristos 
495929c70cbSchristos krb5_error_code
496929c70cbSchristos hdb_seal_keys_mkey (
497929c70cbSchristos 	krb5_context /*context*/,
498929c70cbSchristos 	hdb_entry */*ent*/,
499929c70cbSchristos 	hdb_master_key /*mkey*/);
500929c70cbSchristos 
501929c70cbSchristos krb5_error_code
502929c70cbSchristos hdb_set_last_modified_by (
503929c70cbSchristos 	krb5_context /*context*/,
504929c70cbSchristos 	hdb_entry */*entry*/,
505929c70cbSchristos 	krb5_principal /*modby*/,
506929c70cbSchristos 	time_t /*modtime*/);
507929c70cbSchristos 
508929c70cbSchristos krb5_error_code
509929c70cbSchristos hdb_set_master_key (
510929c70cbSchristos 	krb5_context /*context*/,
511929c70cbSchristos 	HDB */*db*/,
512929c70cbSchristos 	krb5_keyblock */*key*/);
513929c70cbSchristos 
514929c70cbSchristos krb5_error_code
515929c70cbSchristos hdb_set_master_keyfile (
516929c70cbSchristos 	krb5_context /*context*/,
517929c70cbSchristos 	HDB */*db*/,
518929c70cbSchristos 	const char */*keyfile*/);
519929c70cbSchristos 
520929c70cbSchristos /**
521929c70cbSchristos  * Create SQLITE object, and creates the on disk database if its doesn't exists.
522929c70cbSchristos  *
523929c70cbSchristos  * @param context A Kerberos 5 context.
524929c70cbSchristos  * @param db a returned database handle.
525929c70cbSchristos  * @param filename filename
526929c70cbSchristos  *
527929c70cbSchristos  * @return        0 on success, an error code if not
528929c70cbSchristos  */
529929c70cbSchristos 
530929c70cbSchristos krb5_error_code
531929c70cbSchristos hdb_sqlite_create (
532929c70cbSchristos 	krb5_context /*context*/,
533929c70cbSchristos 	HDB **/*db*/,
534929c70cbSchristos 	const char */*filename*/);
535929c70cbSchristos 
536929c70cbSchristos krb5_error_code
537929c70cbSchristos hdb_unlock (int /*fd*/);
538929c70cbSchristos 
539929c70cbSchristos krb5_error_code
540929c70cbSchristos hdb_unseal_key (
541929c70cbSchristos 	krb5_context /*context*/,
542929c70cbSchristos 	HDB */*db*/,
543929c70cbSchristos 	Key */*k*/);
544929c70cbSchristos 
545929c70cbSchristos krb5_error_code
546929c70cbSchristos hdb_unseal_key_mkey (
547929c70cbSchristos 	krb5_context /*context*/,
548929c70cbSchristos 	Key */*k*/,
549929c70cbSchristos 	hdb_master_key /*mkey*/);
550929c70cbSchristos 
551929c70cbSchristos krb5_error_code
552929c70cbSchristos hdb_unseal_keys (
553929c70cbSchristos 	krb5_context /*context*/,
554929c70cbSchristos 	HDB */*db*/,
555929c70cbSchristos 	hdb_entry */*ent*/);
556929c70cbSchristos 
557929c70cbSchristos krb5_error_code
558929c70cbSchristos hdb_unseal_keys_kvno (
559929c70cbSchristos 	krb5_context /*context*/,
560929c70cbSchristos 	HDB */*db*/,
561929c70cbSchristos 	krb5_kvno /*kvno*/,
562929c70cbSchristos 	unsigned /*flags*/,
563929c70cbSchristos 	hdb_entry */*ent*/);
564929c70cbSchristos 
565929c70cbSchristos krb5_error_code
566929c70cbSchristos hdb_unseal_keys_mkey (
567929c70cbSchristos 	krb5_context /*context*/,
568929c70cbSchristos 	hdb_entry */*ent*/,
569929c70cbSchristos 	hdb_master_key /*mkey*/);
570929c70cbSchristos 
571929c70cbSchristos int
572929c70cbSchristos hdb_value2entry (
573929c70cbSchristos 	krb5_context /*context*/,
574929c70cbSchristos 	krb5_data */*value*/,
575929c70cbSchristos 	hdb_entry */*ent*/);
576929c70cbSchristos 
577929c70cbSchristos int
578929c70cbSchristos hdb_value2entry_alias (
579929c70cbSchristos 	krb5_context /*context*/,
580929c70cbSchristos 	krb5_data */*value*/,
581929c70cbSchristos 	hdb_entry_alias */*ent*/);
582929c70cbSchristos 
583929c70cbSchristos krb5_error_code
584929c70cbSchristos hdb_write_master_key (
585929c70cbSchristos 	krb5_context /*context*/,
586929c70cbSchristos 	const char */*filename*/,
587929c70cbSchristos 	hdb_master_key /*mkey*/);
588929c70cbSchristos 
589929c70cbSchristos #ifdef __cplusplus
590929c70cbSchristos }
591929c70cbSchristos #endif
592929c70cbSchristos 
593929c70cbSchristos #endif /* DOXY */
594929c70cbSchristos #endif /* __hdb_protos_h__ */
595